Composition is probably the most important component of a pleasing image. It is composition that sets a piece of photographic art apart from a simple snap. Interestingly enough, composition is defined as much by that which isn't obvious in a shot as those elements that are clearly defined. Depth of field is the term that describes which elements of an image are visible in acceptably sharp focus and which elements are blurred out. Depth of field defines that area of an image that extends in front of and behind the focal point of a particular subject. Typically landscape photography requires very large depth of field, everything from a few inches in front of the camera to infinity has to be in acceptable focus. Look at any examples of the best and there is always something in the foreground, something close, often refered to as foreground interest. Being a landscape shot not only should there be foreground interest but there should be clear focus all the way to the horizon. Candid shots of people and some portrait techniques often call for much narrower depth of field, in some cases only a couple of inches front to back are in sharp focus. I have examples of great candid shots where the subject's eyes are in focus but the tip of their nose and their ears aren't!
Depth of field is a crucially important tool in photographic composition and its skilled control really can add to one's photographic repertoire. It allows the photographer to clearly define the central subject of any image, isolating it from confusing and distracting backgrounds. Consider this first shot; it's quite a nice summery scene and the subject, the brick built bird tower, is visible and obvious. Even though it is the most dominant structure in the picture it blends into the overall scene and doesn't "pop" from the surroundings (by intention in this case).
Now consider this second image. Just a single glance reveals the subject clearly, even though it's nothing more than a small group of tiny pink flowers. The reason these tiny little blooms "pop" so evidently is the eye's urge to examine items in sharp focus and ignore less defined components of the scene.
The process of using focus in this way relies on appropriate management of Depth Of Field (DOF). Until recently, useful DOF control was only really available on higher end SLR cameras. SLRs, specifically their lenses, enjoy large apertures and long focal lengths and it is the combination of these parameters that provide the narrow DOF effect. This is much more of a challenge on smaller compact cameras due to the physical size limitations enforced by the compact format. More recent compacts do offer the attributes necessary to achieve these desirable results and the Canon Powershot G10 is a good example. The combination of a very short focal length and small maximum aperture explains why most compact cameras defer to providing extensive depth of field ensuring as much of an image is in focus as possible.
OK so far so good, DOF is a great thing, so how do you control it? It's actually pretty simple if your camera has the capabilities. DOF varies depending on the focal length of a lens, its aperture setting and the distance between the camera and the desired subject. if you want to close down the depth of field so only a narrow sliver of the image is in sharp focus, use a lens of 50m focal length or greater and open the aperture as far as you can (f5.6 or wider) while getting relatively close to your subject. If you want to open up the DOF ensuring as much of the field of view is in focus as possible, close down the aperture to say f11 or smaller. If you have the capability, set your camera to AV (aperture value) mode where the camera will adjust the shutter speed automatically. This way all you have to think about is the composition and the desired DOF by varying the aperture. (most pros shoot with manually set values. If they are going to use an automatic mode, it will typically be AV as it gives them creative freedom to adjust DOF). There is a complex equation that enables the calculation of DOF but it is more complicated to explain than the scope of this post permits. Fortunately there are a number of on-line calculators that can help and DOF Master is one of the best. The link offers access to the on-line calculator and its downloadable forms. This site also provides a nicely illustrated description of Depth of field and the various components and considerations that enable its mastery.