It’s actually pretty simple to make a small electromagnet of your own. All you need is a battery and some wire, and a compass to show the magnetic pull.
Take an ordinary AA or D battery and connect a piece of wire to run from the plus (+) side to the negative (-) side. Place the compass right near the wire. You should see that the needle moves away from North, and points in the direction of the wire. This is a sign that the wire is magnetized. Don’t leave your wire connected for more than a minute or so, because the battery will drain very quickly. As soon as you take the wire off one end of the battery, the compass needle will return to normal.
You can make a much stronger electromagnet by twisting the wire around a pencil a number of times. It should now be able to pick up a paperclip. You can experiment with more twists, or winding the wire around a metal nail.