Setting the fence posts
Space your fence posts to either 6′ or 8′ apart, depending on the dimensions of your yard. For example, if the length of your yard is 30 feet, you should space your posts 6′ apart. Drive a stake or use a flourescent marker to mark where you intend to put the center of the posts.
When setting in your fence posts, bury them in the ground at least 1/3 of its full length to ensure that the post doesn’t move when the wind blows. Use a post hole digger to dig straight holes to the proper depth. If you want, you can anchor your posts more firmly by making the hole a bit wider at the bottom than at the top. You can then put a large stone or gravel at the bottom of the hole for drainage. Use a wood preservative on the part of the post that will be underground to prolong the life of the post. Leave it to dry overnight.

Packing the fence posts
Make sure that you insert the post completely upright and use a leveler to help you. Keep the post secure with stakes as shown in the image to the left, courtesy of Expert Village.
After you have the post secured, pour in the concrete to 2 inches below the surface so that you can let the grass grow back in. Remove the braces only after the concrete has set.

Building the fence
Attach wooden rails (planks that horizontally connect 2 or 3 posts together) to about every 2 feet of post height. Attach a bottom rail to the outside of the posts about 6″ from the ground, one in the middle, and one at the top. Leave a space between two posts open if you intend on installing a gate.
Before installing the pickets, make sure that they are aligned properly by using a line attached to the posts at the same place. When properly aligned, attach them in place using nails and continue to attach the rest accordingly.

Click here to learn how to install a gate for your fence