Controlling Depth of Field
A photographed object will only appear sharp in an area a specific distance from the camera. The human eye and brain still accept some areas of the image as acceptably sharp if they lie near the plane of focus and already show a small degree of blur. This zone, which is still in acceptably sharp focus, is called depth of field.
You'd typically want a wide depth of field when shooting landscapes, so as to have everything from the flower in the foreground to the mountains on the horizon in focus. You'd typically want a narrow depth of field for such subjects as portraits and flowers, blurring the background to avoid distractions.
How large this depth of field is depends on the distance to the subject, the aperture, and the focal length of the lens. Whether you're shooting film or digital makes no difference.
If the plane of focus lies further away from the camera, the depth of field is wider than if the camera focuses on an object close by.
Small apertures (large f/numbers) result in a wider depth of field.
Short focal length lenses (wide angle) have a wider depth of field than long focal length lenses (telephoto).
The depth of field is determined by the actual focal length of the lens, not the "35-mm equivalent" often used in the camera specifications. Because most compact cameras have sensors much smaller than SLRs, they have much shorter lenses, giving wider depth of field. This is great for landscapes, not so great for portraits.
To get a narrow depth of field, set the aperture as large as you can (smaller f/numbers), move in close to the subject, and zoom in. If your camera doesn't give you direct control over the aperture, try using the Portrait mode. And yes, the last two items above, moving in close and zooming in, are in opposition, You'll have to decide on the best balance for your picture.
To get a wide depth of field, set the aperture as small as you can (larger f/numbers), move away from the subject, and zoom out. If your camera doesn't give you direct control over the aperture, try using the Landscape mode.
Before going on vacation or shooting your child's wedding, experiment with these factors. Shoot things in your backyard or at a park, trying for both narrow and deep depth of field, then look at the pictures on your computer.