The Earth acts as if it contains a magnet due to the circular current inside the Earth’s core. The Earth also produces a magnetic field, with the field lines being most concentrated at the poles.
If Earth had a big bar magnet, the south pole of the magnet would be near the geographic north and the north pole of the magnet will be near the geographic south.
Earth’s magnetic field is useful for navigating the planet. For example, a compass contains a dial (to show the direction) and a magnetic needle (to help with pivoting).
Opposite poles attract, so the north pole of the compass is attracted to the Earth’s magnetic south pole. Earth’s magnetic south pole is near its geographic north pole. This means that the north pole of the magnetic compass will point towards the geographic north pole.