Depth of Field
--Dustin Fife
What is depth of field?
"Depth-of-field is the zone of acceptable sharpness in the image" (http://www.apogeephoto.com/feb2005/jaltengarten2_2005.shtml). In layman's terms, this says that depth of field refers to how much of your image will be sharp and how much will be soft (out of focus). Take a look at the image below:

This image is said to have a "shallow depth of field," meaning that the distance between what is in focus vs. out of focus is "shallow." Now let's look at another image that does not have a shallow depth of field:

Even though the actual distance between the rocks hasn't changed at all, it looks as if the rocks in the front are just as sharp as the rocks in the back. In this lesson, we will learn how to create that "depth of field" (both shallow and deep). We will also learn when to use it to our advantage.
How do you change the depth of field?
There are two ways to increase or decrease the depth of field:
1. Change the f-stop. It all comes down to the camera's aperture (f-stop). The higher the f-stop, the higher the depth of field (or in layman's terms, the higher the f-stop, the more of your scene that is in focus). The lower the f-stop, the shallower the depth of field (meaning that proportionately less of your scene is in focus). For the top picture, I shot it at a f2.8, while the bottom picture was shot at f22.
2. Move. Literally. The closer you are to your subject, the shallower your depth of field will be (that is, less of your scene will be in focus). Watch what happens when you move really close to your subject. (My wife took this picture and she nearly poked my eye with the camera):

As you can see, only my eye is in focus.
Now let's look at what happens when we back up:

Tricky eh? Both pictures were shot at the exact same aperture (f2.8). But, in the family picture, in order to get this picture to look the way it does, we moved about 10o feet or so from the family. (The camera was so far away, it's a miracle everyone was looking at the same place). And we made sure the family was positioned about 100 feet away from the background. Because we were so far back, the entire family was within the "focus point."
Why does Aperture affect depth of field?
Think about it like this: imagine that your lense is a big pipe that empties into a water reservoir. Now imaging that there is portal where the pipe and the reservoir meet. This portal has the ability to open wider when more water is needed in the reservoir, or it has the ability to become more narrow when less water is needed in the reservoir.
The reservoir represents the camera's sensor--where all the light goes. The pipe represents your lense--what the light travels through. The portal represents your aperture. Just like our portal that determines the amount of water coming in, the aperture determines the amount of light coming in.
So, what happens when we set our aperture to 2.8? The "portal" will open very wide. (I know, it's a little counter-intuitive--the lower the number, the wider the aperture is opening). And what happens when we set our aperture to f22? You got it! The "portal" will narrow and let very little light come it.
The important thing to remember is that a high depth of field comes from a narrow aperture, which results in more of your scene being in focus. A shallow depth of field comes from a wide aperture, which results in less of your scene being in focus.
When to use high vs. low apertures
Portraits: Typically for portraits we want to use a low aperture (e.g. f5.0) so that the person "pops" out of the background. But, be careful not to have part of the person in focus, and part out of focus (unless it's intentional).
Portraits typically use low apertures so the subject "pops" out of their background and draws the focus to the individual. This picture was shot at f5.0. To ensure that his entire face was in focus, I stood back about 20 feet and had him positioned about 30 feet from the fence.
Landscapes and Architecture: We typically use high apertures for these so that you can see the details of the entire scene. Since you will be using high f-stops (narrow apertures), it will take longer for sufficient light to enter the sensor. Because of this, it is often best to use a tripod. The picture below was taken at f22. Notice how everything looks in focus.

Helpful Links:
http://www.photonhead.com/beginners/shutterandaperture.php
Good old Wikipedea