Phiber, to make an electromagnet simply find some old plastic covered 22 gauge telephone wire, wrap about 100 turns around a nail, then connect to a 1.5 volt D cell.
The wire is not that critical but must be insulated as CocaCola says. And the number of turns is not that critical. Have fun.