What kind of depth of field do you want? That is, how much of the image do you want to be in focus? If you want as much in focus as possible, use a smaller aperture such as ƒ/11, ƒ/16 or higher (ƒ/8 for advanced compact cameras; they often don't have smaller ƒ-stops, but because of their lens' size, depth of field is still very high). Smaller apertures increase depth of field. (It can be confusing to think of a smaller aperture as requiring a larger ƒ-stop number; however, the ƒ-stop actually is a fraction. (If you're not good with fractions, just remember that the higher the number, the smaller the opening and the deeper the depth of field.) To limit depth of field and throw more of the foreground or background out of focus, use a large aperture (a smaller ƒ-stop number).