A lot depends on where you live, type of soils, and use of the fence post. Is it for a wire fence or a wood fence? Is there a lot of wind? Will it be a wood post or a steel pipe?
If you are building a wood fence, and if there is moderate to light wind in your area, 2 feet below the surface should be sufficient for a 4"X4" post. If you live in a place with average to low moisture in clay or hard soil, you can dig the hole with a manual post-hole digger, drop in the post, support it, then pour in about 1.5 bags (60lb bag) of pre-mix concrete. Pour it in dry, right from the bag, then tamp in fill dirt to top off the hole. The pre-mix will draw out the moisture in the soil and set up hard over time.
If you live in an area where there is a lot of moisture, you will probably want to add water to the pre-mix before pouring it into the hole. Pour in enough to trowel a small domed area at the base of the post, to direct rain water and drainage away from the post. That will help the post last longer.
Use redwood, cedar, or treated posts and you should get 7-10 years out of them in most areas. Steel pipe works the same way, except they require a little more cement mix in the hole, because they are normally smaller than wood posts (2 or 2 1/4" pipe is normal).
After the posts are set, mark and trim off the tops evenly. Use a large pipe cutter for steel posts. Makes nice, even cuts with no burrs.
Personally, I prefer galvanized steel pipe, set as above, in concrete with bolt-on metal tabs to which the fence is attached. The steel pipe posts last longer. Make sure they are sufficient wall-thickness to handle the wind in your area.