How does time lapse camera work?

In time-lapse, the camera records images at a slow interval such as one frame every thirty seconds (1/30 fps). The shutter will be open for some time within that period.