Record the distance your fence will cover. Take note of any special features like big trees, hills or uneven ground. Also figure out where the gate will go. Measure only on your property.
Make a Plan
Any lumber yard or hardware store that sells wood for fences also sells plans to build them. It is worth paying the $20 or so for the plans instead of trying to figure it out yourself. A predesigned plan will also tell you exactly how much wood you will need.
Soak the Posts
Soak the bottom of the fence posts in wood preservative for at least 2 hours. This will prevent the wood from rotting away under the ground. For a 6-foot-tall fence, you will need to buy 8-foot-tall posts and soak the bottom 2 1/2 feet.
Install the Posts
Start by installing posts at the corners. For a 6-foot fence, dig 2 1/2-foot holes. Place a half-foot of gravel below the posts, then fill the space around the posts with concrete. Prop the posts straight up until the cement dries. Run a string between corner posts to make sure your fence follows a straight line. Next, install posts every 6 to 8 feet. Calculate the distance based on the width of your fence boards so you won't need to cut one in half. Be sure to leave a 3-foot space for the gate, with a post on both sides.
Install the Rails
The fence needs two rails running parallel to the ground. This is what the fence boards will be attached to. Nail 2x4 boards between posts 6 inches above the ground with 3 1/2-inch nails. Attach parallel rails 6 inches from the top of the fence
Install the Boards
Start in a corner and nail the fence boards to the rails. Drive two nails into the top rail and two into the bottom, being careful to leave a 1-inch space from the sides. Any closer can splinter the boards. Move down the line. If your calculations are correct, they should fit perfectly between the posts.
Install the Gate
Build a gate to fit the dimensions of the space you left for it in the fence. Make it 1 inch narrower and at least 4 inches shorter than the fence. Install diagonal supports for strength. Attach the hinges to the gate first and then to a post. Make sure the top of the gate lines up with the fence. Add a handle, latch and lock after the gate is hung.