Mark the boundary of the fence around your garden with spray paint. Measure the distance around the perimeter and mark the position of the fence posts. A post every 4 to 5 feet will allow the fence to curve around the garden.
Dig the holes for the fence posts. You can choose to dig holes 24 inches deep by 12 inches wide and use concrete to hold the pole in place or to dig 32 inches deep to bury the pole without the use of concrete. Use a manual pole digger for soft soils or rent a gas-powered auger for hard soils. Drop a shovelful of gravel in each hole for drainage.
Set the fence poles in the holes. As you fill in the hole, whether with concrete and then dirt or simply dirt, check if the pole is plumb and at the right depth with the other poles. Tamp the dirt down firmly with a pole tamper until the soil is level with the surrounding area. Dry the concrete footing overnight.
Build your pickets by laying two 2-by-4-inch boards, 32 inches apart from each other on a flat surface. These will act as your rails and need to be the length of the distance between your fence posts. Add the pickets one at a time, screwing them in place with two decking screws at each board using an electric drill. Use a t-square to position them straight on the boards. Space the pickets evenly by using a piece of loose picket to fill the space between each slat as you install them.
Attach the section of pickets to the fence posts using 2-inch L-brackets positioned under the rails to screw them into the posts. Check your measurements each time to make sure the fence sections are straight. Leave a gap of at least 2 inches under the fence for mowing the grass.