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