An electromagnet is a type of magnet in which the magnetic fieldis produced by an electric current.
The magnetic field disappears when the current is turned off.
Electromagnets usually consist of wire wound into a coil. A current through the wire creates a magnetic field which is concentrated in the hole in the center of the coil.