Magnetic force
In the picture on the right, iron dust has been used to show the magnet's force lines. These force lines comprise the magnet's magnetic field.
Planet Earth has its own magnetic field. It surrounds planet Earth, consisting of force lines that travel between the planet's two poles.
The needle of a compass is a small magnet that reacts with Earth's magnetic field. The needle always orients itself in a way where it points towards the northern and southern poles of the planet's magnetic field.
Many kinds of things can affect an object's magnetic field. One of these factors is heat, which can remove an object's magnetism. Usually, a temperature of over 80 degrees Celsius is enough. Magnetism can also be removed by striking the magnet on different objects.