Cinema Classics: Electromagnetism: How Motors and Generators Work. A magnet on a pivot is spun by repeatedly switching the poles of a nearby hand held magnet. The polarity of an electromagnet switched by hand does the same thing. Using a commutator to automatically switch polarity of a coil between two magnets results in a simple motor. Spinning the coil by hand produces current.