Magnets attract only certain objects, those that contain, iron, steel, cobalt or nickel. They have 2 poles, north and south.
When to two magnets are pulled towards each other we say that they attract, when they push apart from each other they are said to repel.
If you let your child play with the magnets they will notice that when 2 north pole are put close together they repel and when 2 south poles are pushed together they repel. This is because with magnets opposites attract.
The planet Earth acts like a huge magnet is inside it! It has a magnetic field that acts the same as any other magnet.
Not my best drawing ever but you get the idea
I got Naomi to draw one of these out herself, being a visual learner she likes to draw to learn.
To see how this is similar to how a magnet works you can try this mini experiment: Magnetic fields...