electric motors and generators
Electric motors are everywhere! In your house, almost every mechanical movement that you see around you is caused by an AC (alternating current) or DC (direct current) electric motor. An electric motor uses magnets to create motion. If you have ever played with magnets, you know about the fundamental law of all magnets: Opposites attract and likes repel.
So, if you have two bar magnets with their ends marked "north" and "south," then the north end of one magnet will attract the south end of the other. On the other hand, the north end of one magnet will repel the north end of the other (and south will repel south). Inside an electric motor, these attracting and repelling forces create rotational motion.
An electric generator is a device that converts mechanical energy obtained from an external source into electrical energy as the output.
A generator uses the mechanical energy supplied to it to force the movement of electric charges present in the wire of its windings through an external electric circuit. This flow of electric charges constitutes the output electric current supplied by the generator.