An electromagnetic force is generated when electric current passes through a coil wrapped around a ferromagnetic core. The magnetic field produced by the coil magnetizes the ferromagnetic material, causing it to behave like a magnet while current is flowing. Some key aspects that produce this effect are the coil, electric current, magnetic field, and ferromagnetic material at the core.