Magnetism is a strange thing. Blobs of plasma containing different magnetic fields don't necessarily like to mix together. Remember - opposite poles of a magnet repel each other.
More important than any desktop toy, however, is the fact that the Earth's magnetic field repels and deflects the solar wind. It protects us with an invisible shield. This picture shows how...
Have a go and find out for yourself
Take two ring magnets
and place them on a pole so that the same magnetic
poles are facing each other. Imagine the lower magnet
is the Earth's magnetic
field and the upper magnet is the solar
wind. Try making the solar wind fight against
the Earth's magnetic field in its attempt to reach
the Earth.