Gather an iron nail or iron bolt
Wrap insulated copper wire tightly around the nail
Leave both wire ends free
Strip the insulation from the two wire ends
Connect one wire end to the positive terminal of a battery
Connect the other wire end to the negative terminal of the battery
Use the nail as the electromagnet
Disconnect the battery when not in use
