Electromagnetism is caused by the magnetic fields around electric currents. The fields can cause forces with other nearby magnets and these forces can be used to make motors spin.
Part of Combined ScienceMagnetism and the motor effect