Why does a magnetic compass point to the Geographic North Pole?

The magnetic poles (red line) and geographic poles (in green) are separated by about ten degrees right now. The earth spins around the geographic poles, but magnetic compasses point to the magnetic poles. Public Domain Image, source: Christopher S. Baird.

A magnetic compass does not point to the geographic north pole. A magnetic compass points to the earth's magnetic poles, which are not the same as earth's geographic poles. Furthermore, the magnetic pole near earth's geographic north pole is actually the south magnetic pole. When it comes to magnets, opposites attract. This fact means that the north end of a magnet in a compass is attracted to the south magnetic pole, which lies close to the geographic north pole. Magnetic field lines outside of a permanent magnet always run from the north magnetic pole to the south magnetic pole. Therefore, the magnetic field lines of the earth run from the southern geographic hemisphere towards the northern geographic hemisphere.

The geographic north and south poles indicate the points where the earth's rotation axis intercepts earth's surface. Consider holding a tennis ball between your thumb and forefinger and pushing on the side to make it spin. The points where your thumb and finger make contact are the geographic north and south poles of the tennis ball's spin. A person standing on the equator is moving the fastest due to earth's rotation, while a person standing on a geographic pole does not move at all from earth's rotation. Earth's magnetic poles designate the central location of the region where the magnetic fields lines start and finish. Earth's geographic and magnetic poles are not exactly aligned because they arise from different mechanisms. Earth's magnetic field is caused by circulating currents of liquid iron in the outer core. Furthermore, earth's magnetic poles are constantly changing location relative to earth's geographic poles. Currently, the magnetic south pole lies about ten degrees distant from the geographic north pole, and sits in the Arctic Ocean north of Alaska. The north end on a compass therefore currently points roughly towards Alaska and not exactly towards geographic north.