What is an electromagnet? Describe the construction and working of an electromagnet with the help of a labelled diagram.

An electromagnet is called a temporary magnet because it produces magnetic field lines only when the current flows through the coil of the electromagnet. When we stop the current through the coil, the magnetic field lines diminishes.