Take an iron nail and wind insulated copper wire over it making all the turns in same direction. Scratch the ends of wire and connect them with a dc battery.
Electro-magnets are made by passing current through wire wrapped around a ferrous object. An example is wrapping a nail several time with wire, then hooking it up to a battery.