An electromagnet is an artificial magnet made of a soft iron bar called a “core” around which an insulated copper wire is wound.
When current flows through the wire of an electromagnet, magnetism is induced in the electromagnet.
An electromagnet works on the principle of “magnetic effect of current”.
An electromagnet behaves as a magnet only when current flows through its coil and in the absence of current, the electromagnet behaves like a piece of iron.
The polarity of an electromagnet can be changed by reversing the direction of the current flowing through its coil.
The magnetic strength of an electromagnet can be increased by increasing the magnitude of current flowing through its coil and by increasing the number of loops of the coil of the electromagnet.
Below is the diagram showing various components of an electromagnet.