The hardest part of building a new fence is digging the holes for the posts. For this you'll need a posthole digger. Hand-operated clamshell and auger diggers work fine in sandy, rock-free soil. If your soil is rocky or you have a lot of holes to dig, rent a power-driven auger.
For best results, use pressure-treated, ground-contact lumber, cedar, or redwood. With the latter, no finishing is necessary; the fence can be left to weather naturally. If you must, you can use untreated wood for screening and top rails, and for bottom rails that are at least four inches above the ground.
You'll need 4x4s for fence posts, 2x4s for rails, and 1x4s or 1x6s for screening. To build a fence:
Step 1: Lay out the approximate fence line, making sure you're not on your neighbor's property.
Step 2: Establish the exact location of the first end or corner post. Dig a hole there that's 18 to 24 inches deep. For a fence that's five or six feet high, dig down 24 inches.
Step 3: Pour about three inches of gravel into the bottom of the hole to improve drainage, then set the post into the hole.
Step 4: Level the post. Then brace it in two directions with wooden stakes.
Step 5: Prepare premixed concrete, stir it well, and pour it into the hole around the post. Slice the concrete mix periodically with a spade as you pour to eliminate any air pockets. At the top of the hole, mound concrete around the base of the post to shed water.
Step 6: After the first post is set, determine exactly where you want the opposite end or corner post. Set this post the same way you set the first one. Only end, corner, and gate posts need to be set in concrete. Intermediate posts usually can be set in soil.
Step 7: To set intermediate posts, measure the height of each end post above grade level to ensure that both are the same height. Drive a nail partway into each post, facing the direction of the fence line, just above ground level. Tie a piece of twine to one nail, stretch it to the other post, and secure it to the other nail. Using the string as a guide, drive stakes to locate the intermediate postholes. Posts are usually spaced eight or ten feet apart. Remove the string and nails after you've driven the stakes.
Step 8: Dig holes for the intermediate posts.
Step 9: Pour about three inches of gravel into each hole. Set a post into each hole and use the twine as a guide for checking the post's height. If necessary, make height adjustments by varying the depth of gravel in each hole or shimming up the posts with stones.
Step 10: Set each post and plumb it (make sure it's perfectly vertical), then fill in around its base with about six inches of gravel. Fill up the rest of the hole with soil, shoveling in about four inches at a time and compacting each layer with a scrap of 2x4.
Step 11: Cut 2x4 rails to fit flat along the tops of the posts. The rails can extend from post to post, or a rail can span two sections. Measure and cut each rail individually, to allow for slight variations in fence-post spacing. Butt the ends of the rails tightly together. Then, beginning at one end of the fence line, nail the rails into place, using two 10d galvanized common nails at the ends of each rail.
Step 12: Measure and cut a 2x4 bottom rail to fit snugly between each pair of posts. Position the rails flat between the posts, anywhere from slightly above grade level to 12 inches up. Toenail the bottom rails into place with a 10d galvanized nail driven through the fence post and into the end of the rail on each side. Use a level to keep the rails even.
Step 13: Measure and cut the fence boards. The boards should be of uniform length, as long as the distance from the bottom of the bottom rail to the top of the top rail, as measured at one of the posts. Starting at one end, nail the boards to one side of the rails, with a space equal to a single board width between each; use a board as a spacer as you work. Secure each board to the rails with two 8d galvanized nails at the top and two at the bottom.
Nail the tops first, flush with the top, then nail the bottoms, pulling or pushing the bottom rail into alignment as you go. If your fence will have boards on both sides, nail up all the boards on one side first, then nail alternate boards to the other side of the rails, positioning the boards to cover the spaces left by the boards on the opposite side of the fence.
Now you possess enough knowledge to repair your fence, whether it needs minor fixes or must be rebuilt altogether.