To confirm what others have said, here's what I found on a website:
"In traditional cameras the shutter is a mechanical arrangement using a few metal slats, which can be opened as a hole in the objective. The hole is shut while there is no photographing so that no light at all can force its way into the film. When an image is taken, the slats flick quickly to the side and back again. In this short space of time, while there is light in the objective, the film is exposed.
"We also find a shutter function in digital cameras, although it doesn’t work in quite the same way. There is normally a constant “hole” in the objective, so that the image sensor is exposed all the time. If this wasn’t the case then we wouldn’t be able to see the subject on the LCD screen. It continuously receives signals from the image sensor so that we can see the subject through the lens (TTL).
"In small ordinary digital cameras a mechanical shutter does not, in fact, regulate exposure time. The image sensor does this by itself; it can be programmed to gather light for a certain period. There is quite a lot of flexibility here, for example, many cameras work with a stepless variable shutter speed such as 1/148 sekund.
"The shutter speed can be 1/10.000 second, when an image sensor controls the time. Few mechanical shutters can work as fast.
"It is first when the exposure is complete that the mechanical shutter closes. Then the image sensor can discharge its data in the dark. A shutter closes too, by the way, if the LCD screen is shut down, and when the camera is turned off."