The aperture is a small adjustable opening in a lens which Photographers and Cinematographers use to control exposure and focus. How does it work?
Sometime in year 1021 a scientist named Hasan Ibn al-Haytham discovered that light travels in straight lines. This helped explain a phenomena which was already known at the time which we call The Camera Obscura.
A Camera Obscura is a darkened box (or room) with a small hole allowing some light to enter. That light will create an image inside the dark box. It is the foundation of photography in general, and the aperture in particular.
Light is emitted from a light source (like the sun) and travels until it hits an object. Some of that light is absorbed in the object, and some of it is reflected off of it. The reflected light is caught by our eye - this is how we see.
Every point on every object reflects light in all directions. In the example here, a point on the head of the Discuss Thrower is reflecting light rays to all directions. If that were not the case, we would not be able to see the Discuss Thrower's head if we moved around it!
If we place a Camera Obscura with a small opening (an aperture) next to the Discuss Thrower, some of the light will pass through the opening and some will be prevented from doing so. In fact, the secret to the workings of the camera aperture are all laid out in this image. How does the size of the hole in the Camera Obscura affect the light?
Increasing the size of the hole in the Camera Obscura will have an effect on two things: the amount of light entering the box and the spread of the light rays originating from the point on the Discuss Thrower's head.
The amount of light has a direct effect on the brightness of the image, or exposure.
The spread of the light rays has an effect on focus: the more condensed and close together the light rays are, the smaller the image they create. Since the light rays originate from one small point on the Discuss Thrower, it will be best if they create an equally small point on the image.
This is exactly how a real adjustable camera aperture works. Opening the aperture means increasing the size of the hole. This will allow more light to pass through the lens, making the image brighter. At the same time, some objects will become out of focus. Closing the aperture means decreasing the size of the hole. This will reduce the amount of light passing through the lens, making the image darker. Objects which previously were out of focus will now become sharp.
Since the aperture shapes the light passing through a lens, we can often see the shape of the aperture itself by examining the out of focus parts of an image, what is called Bokeh.