Electromagnet

An electromagnet is a type of magnet in which the magnetic field is produced by the flow of electric current. The magnetic field disappears when the current is turned off.