Inductor and Direct Current Voltage (DC)

When connect a Coil of several turns to an Electricity source in a closed loop . The current in the circuit set up a Magnetic Field that has the same properties like a Magnetic Field of a Magnet

B = L I

When the current is turned off , the Magnetic Field does not exist .

B = 0

Conducting Coil is called Electro Magnet