An electromagnet is a magnet that only turns on when electricity runs through it. A basic homemade electromagnet consists of a copper wire coil wrapped around some sort of metal core. The stronger the electromagnet, the more paper clips, nails and other objects you can pick up with it.
Get a ferrite rod for the magnetic core. Although most homemade electromagnets used iron nails or railroad spikes, ferrite rods will actually make for a much stronger magnetic field.
Wrap a strand of enamelled copper wire as tightly as possible from one end of the ferrite rod to the other. Be sure to only go in one direction and not overlap the wire with itself. Fasten the wire down to both ends with a small piece of tape.
When you reach the end, run the wire straight down to where you started and begin again, coiling it in the same direction to the top. You should have two parallel spirals of wire going from the bottom to the top of the core.
Wrap the electromagnet in tape. This will hold the wire firmly onto the core, preventing the coils from slipping off.
Solder the free ends of the wire to an adjustable DC power supply. Turn the power supply on with the power set to about 5 V. Slowly turn up the power until the electromagnet starts to get hot. Use as much power as you can without making the magnet too hot to touch.