Depth of field (DOF) is primarily controlled by aperture size. Other factors also come into play such as the focal length of the lens and the distance the background is from the subject.
To increase Depth of field
Increased depth- of-field, known as “deep” depth-of field, means a greater amount of area is a photo is in sharp focus. Useful for landscape and similar scenes.
For distant subjects
♦ Higher F-stop numbers (smaller apertures)
♦ Shorter focal lengths (wide angle)
♦ Get further away from the subject
To decrease Depth of field
Decreased depth-of-field, known as “shallow” depth-of-field, means less of the area is in sharp focus from where you focus upon a subject. Use to obtain a blurred background when you want the subject to stand out, especially for macro and portrait shots.
♦ Lower F-stop numbers (larger apertures)
♦ Longer focal lengths (zoomed in)
♦ Get closer to the subject
Please note that, because of their small sensors, most compact digital cameras do not produce shallow depth-of-field like cameras with larger sensors.