Measure the fence line. Dig the postholes accordingly. If you are using privacy fencing, the panels are usually 8 feet long. The distance between the posts should be 7 feet, 10 inches -- each panel needs to overlap the 4-inch-by-4-inch post by 2 inches. For a wood fence, dig the postholes 2 feet deep. Follow the instructions for the type of metal fencing that you purchased if you are using metal fencing.
Center the fence post in the posthole. Put the rocks or broken concrete into the bottom of the postholes to help support the posts.
Pour 8 inches of cement into the postholes. Add water to the cement and mix it in, pursuant to the instructions on the brand of cement that you purchased. Allow the cement to set pursuant to the instructions.
Backfill the postholes with dirt. Tamp the dirt down with your foot, the shovel or the butt end of a 2-inch-by-4-inch board.