Depth-of-field
The distance in front of and behind the subject that is acceptably in focus
When a subject is brought into sharp and accurate focus, the lens generates a zone extending in front of and behind the subject plane within which all objects will register sharply and clearly on the film. This zone is called the “depth-of-field”.
Sometimes you will want everything in the foreground and background in focus. Sometimes you will want a subject in the foreground to be in focus while keeping a busy background out of focus. f-stops are the main factor that controls this effect, with blurring most apparent at large apertures. Small apertures keep more of the frame in focus than larger apertures. For example, f/16 will keep most if not all of the image in focus. f/2 will keep just the subject plane in focus, leaving the rest of the image blurred.
N.B. The larger the aperture, and the closer the focal distance, the shallower the depth-of-field. Stopping down to smaller apertures increases the depth-of-field (or focusing tolerance). Depth-of-field is greater beyond the point of focus than in front.