Depth of Field (DoF) is the distance between the nearest and farthest objects in a scene that appear acceptably sharp in the image. It is widely used term in all types of photography and specially popular in Portrait and Landscape photography. We use small DoF (small aperture value), also called shallow depth of filed, in portrait photography to emphasize the subject and throw an unwanted background away from viewer's attention by blurring it; whereas, large DoF (larger aperture value), also called deep depth of filed, is widely popular in Landscape photography where everything from the foreground to the background should be in focus.
What is Depth of Field Preview and When do we need it?
Let's say your lens's widest aperture is f/2.8 and you want to shoot with f/11. In this particular case, when you close down your aperture value to f/11 from f/2.8, your camera will not close down aperture blades, also called diaphragm, immediately after you change an aperture value. This is because all camera bodies focus at the widest aperture of the lens and then stop down to the chosen aperture (f/11 in this case) when you press the shutter release button all the way down to take the picture (after focusing your subject obviously).
Note: I noticed that if you are using Nikon D90 and the D lens which has an aperture ring on it's barrel, you have to set the ring to f/22, lock it and set the actuator (at the end of the lens) which allows opening the aperture from the camera body.
Today's most advanced DSLRs come with a dedicated button (DoF preview button) to preview the Depth of Field and allows you to close down your aperture to the selected value by stopping down the lens's diaphragm. So, when you set an aperture to f/11, pressing DoF preview button closes down the aperture to f/11 and darkens your viewfinder by allowing the less light through an aperture. It is a really helpful tool when you are doing Landscape photography, and most importantly if you are using Hyperfocal distance formula. In often cases, you will get deceived by the widest open aperture and will be difficult to judge what is in focus and what is not through the viewfinder.
Canon EOS 40D has a Depth of Field Preview button right below the lens release button. Every camera manufacturer has a different body design and their choice of placement for this button also differs by camera models (even on the camera from the same manufacturer).