An explaination of the components of Depth of Field, adapted from article by Kerry Drager on Betterphoto.com:
The term “Depth of Field” describes the range of sharpness in a scene that has depth (both a foreground and background). One “rule” is that you get more DOF with a small aperture (high f/number) than with a wide aperture (low f/number), but it’s not always so simple! With DOF, lens focal length, distance to subject, and other elements also come into play.
In fact, when shooting close-ups with a telephoto lens or a macro lens, it’s pretty much impossible to get both a close foreground and a relatively distant background sharp at the same time, even with the use of a high f/number.
More DOF Less DOF
In these images, I used a long telephoto lens and focused directly on the close-up fence post. I wanted to keep the fence post and some of the wire sharp, so I avoided a super-wide aperture (low f/number). I chose to “compromise” with two images – the same composition but with a high f/number and with a not-so-high f/number. With my DSLR, I previewed the DOF before shooting w via Depth of Field Preview. But if your digital camera doesn’t have this feature, no problem: You can check the LCD monitor after shooting.