The aperture is an opening through which light enters a camera. The size of an aperture is specified by an f-number, which is the ratio of focal length to effective aperture diameter.
Aperture setting affects the amount of light entering the camera, and in turn affects the exposure of a particular scene. A larger f-number means that the aperture is smaller, and vice versa. For example, f/1.8 is a larger aperture than f/8.
Depth of view
The size of the aperture does not affect the quantity of light entering the camera. It also affects the depth of view.
Depth of view is the portion of the scene that appears in focus. Larger apertures (smaller f-number) will give a shallow depth of view. This means that part of the scene will be in focus while the parts outside the depth of view will be thrown out of focus.
Likewise, a smaller aperture (larger f-number), will give a deep depth of view. This will render a greater portion of the scene in focus.
What aperture size to use?
A large aperture is used to isolate the subject. The shallow depth of view will render the subject in focus and throw the background out of focus.
However, if the depth of view is too shallow, you might end up with part of the subject in focus and part of it out of focus.
Small aperture gives a greater depth of view and will render more of the picture in focus. This is used when you want the picture to be as sharp as possible from foreground to background.
If depth of view is not a concern, use the critical aperture of your lens. When the subject and background are in the same plane, depth of view is not important.
The critical aperture of a lens is the aperture that will give the sharpest image. Every lens has its critical aperture. Zoom lenses have different critical apertures at different focal length.
Smaller apertures are supposed to give sharper images. However, at sizes smaller than the critical aperture, diffraction occurs.
Depth of view preview button
Some DSLR cameras come with a depth of view preview button. When you press the button, the camera stops the aperture to the size you selected. This allows you to see the depth of view that you will be getting at that particular aperture.
If your camera has such a button, you can use the button to learn more about depth of view. Use the largest aperture and focus on a near object. Keep the button depressed and change the aperture. You will be able to notice the change in the sharpness of the background.