The shutter is complicated mechanism acting like a window shade allowing light to pass for a determined period of time, for the purpose of exposing to light the digital image sensor to capture a scene. It is placed either behind the camera lens or is built into the middle of the lens, next to the aperture
The time for which a shutter remains open (exposure time) is determined by a timing mechanism and depending on the mechanism used there are two main camera shutters types:
Electronic Camera Shutter Type
Mechanical Camera Shutter Type which have moving parts and come in two kinds - Leaf and Focal Plane Camera Shutter Types.
Electronic shutters simply turn the sensor on and off to capture the exposure. The image builds up as light is captured by the sensor.
Because these camera shutter types do not have moving parts, they are less expensive and can be found in the cheapest cameras, but ironically also in the most expensive. They can be exceptionally accurate when designed with precision.
A leaf shutter is a type of camera shutter consisting of a mechanism with one or more pivoting metal leaves which normally does not allow light through the lens onto the film or digital image sensor, but which when triggered opens the shutter by moving the leaves to uncover the lens for the required time to make an exposure, then shuts.
This shutter, often called an iris or diaphragm shutter, mimics the action of the iris in your eye that opens wider in dimmer light and closes down in bright light.
The larger the number of blades, the more accurately circular is the aperture. An odd number of blades are usually used: 3, 5, or more.
The other type of mechanical shutter is the focal plane shutter and is found in all digital SLRs. It travels in front of the digital image sensor, just above the plane of sharp focus hence its name and works by opening one curtain to begin an exposure and closing another curtain to end it.
The front curtain opens first, moving across the plane of the sensor until it is fully open. Then, after the sensor has been left exposed for the desired amount of time, the rear curtain begins to follow it, gradually covering the sensor until it is completely concealed.
For slower shutter speeds, the first curtain opens from (usually) right to left, and there is a point at which the entire image sensor is exposed to light. After the required time with the shutter open, the second curtain closes the aperture in the same direction. The fastest shutter speed at which this happens is called the flash sync speed.
This process is demonstrated in the below diagram where the black rectangle represents the frame aperture through which the exposure is made, the first shutter curtain is shown in red and the second shutter curtain shown in green is on the right side:
Faster shutter speeds are achieved by the second curtain closing before the first one has fully opened. This results in a vertical slit that travels horizontally across the film or digital image sensor as demonstrated in the below diagram:
On newer cameras the curtains run vertically. This makes them faster than older shutters that ran horizontally because they have less distance to cross (24mm as opposed to 36mm). This faster speed makes it possible to have a faster flash sync shutter speed. Using this technique, modern SLR cameras are capable of shutter speeds of up to 1/8000 of a second.