An electric generator is an electromagnetic device that can produce alternate current electric (AC) through the interaction of an electromagnet and a conventional magnet.
Wikipedia has related information at Electric generator