An electromagnet is made from a coil of wire which acts as amagnet when an electric current passes through it. Often anelectromagnet is wrapped around a core of ferromagnetic material like steel, which enhances the magnetic field produced by the coil.