DSLR Shutter In Detail - YouTube

Here's how a DSLR shutter works. The first and second curtain are both cocked against spring tension and held back by electro magnets. When it's time to fire the shutter, the electronics release the first curtain, then after the exposure time is up, the second curtain. This is one of the reasons why cameras use up battery during long exposures: the second curtain is still held by an electro magnet.