The three basic items to make an electromagnet are a source of current, conducting wire, and a metallic core. Electromagnetic is a type of magnet which is formed with the help of electricity.
When the current is allowed to pass through the wire and the metallic core, the magnetic field is generated around the metallic core and when the current is turned off, the metallic core losses the property of magnetism.