Shake flashlights have a magnet between the wound-up coil and when the magnet moves back and forth, it generates a charge that charges up the battery. This battery charge can then be used to power the LED in the flashlight.