There are two major types of shutter, leaf and focal plane.
The Leaf Shutter
The leaf shutter typically has several, normally 3 to 5 metal blades (leaves) which open fully and then snap shut after the required exposure time. At all speeds the sensor will be fully open for the duration of the shutter release.
Stages during operation
You can see a neat animation of a leaf shutter here.
Focal Plane Shutter Mechanism
The focal plane shutter consists of two blinds, originally made of canvas but now usually made of thin metal. They can travel in the vertical direction or the horizontal. modern cameras tend to travel vertically. In the following diagrams the blinds travel horizontally.
Long shutter time:
The first blind moves to uncover sensor, and the sensor remains uncovered until the second blind covers it.
The value which has the smallest time the whole sensor is open, i.e. the 2nd shutter starts to close the instant the 1st is open, is the flash synchronisation value. This is the maximum speed a standard electronic flash gun will be able to illuminate the whole frame. Some modern flash guns will do repeated firings so that the scene can be illuminated in the partial opening shown below.
Short shutter time:
Faster speeds are achieved by starting the closing of the 2nd blind whilst the 1st blind is still opening. This achieves the correct exposure by writing a strip of light across the sensor.
An excellent web site "How does your focal plane shutter work?" is well worth a visit.