When there is a moving magnet in the vicinity of a coil, there will be current flowing through the coil.