Great photography is about depth of feeling, not depth of field. – Peter Adams
Peter Adams may be right but changing the Depth of Field can be quite useful in some cases; sometimes it may be desirable to have the entire image sharp, in which case large DOF is appropriate.
In other cases, a small DOF may be more effective, emphasizing the subject while de-emphasizing the foreground and background.
Reducing the aperture size increases the depth of field, which describes the extent to which subject matter lying closer than or farther from the actual plane of focus appears to be in focus. In general, the smaller the aperture (the larger the number), the greater the distance from the plane of focus the subject matter may be while still appearing in focus.
So at f4 the DOF will be very small, at f22 the DOF will be large. To show you this I’ve conducted a little experiment, photographing the same scene several times whilst changing the the aperture from f4 to f22.
For this experiment I’ve drafted in Edna and Mabel to act as subjects. Mabel will be in front and throughout the sequence of photographs I will maintain the focus point of my camera on her face. To avoid camera movement it’s mounted on a tripod.
In the photograph above the aperture is set at f4. As you can see, Edna, who is in the background is out of focus.
Now the aperture is f8, notice how Edna is starting to come into focus. Her features are much more clearer, you can even see her pudgy little nose.
At f22 the photograph is in sharp focus from front to back including the fence behind Edna. In other words at f22 I have a large Depth of Field.
Every time someone tells me how sharp my photos are, I assume that it isn’t a very interesting photograph. If it was, they would have more to say. – Anonymous
On a practical note for most of my landscape photographs I tend to use f8, f11 or f16, very rarely do I use f22. There’s a reason for this. If you look at the aperture diagram you can see that the higher the aperture number the smaller the whole is. In combination with variations of shutter speed, that hole controls the light reaching the sensor on my camera. Typically, a fast shutter will require a larger aperture to ensure sufficient light exposure, and a slow shutter will require a smaller aperture to avoid excessive exposure. So If I set the aperture to f22 I would need to have a slow shutter speed, which in turn means I could end up having blur due movement; me holding the camera, the wind moving trees or vegetation, clouds across the sky.