This can be a little confusing because we call it the "north" pole of the magnet, but it's actually attracted to the Earth's magnetic north pole, which is located near the geographic South Pole.
Think of it this way: opposite poles attract. The Earth's magnetic field has a south pole near the geographic North Pole, so the north pole of a magnet is attracted to it.