Opposites attract and likes repel.
The direction of the magnetic field B is defined as the direction of the force on a North pole. The full name of the N pole is North-seeking pole, so by definition the arrow on a magnetic compass points in the direction of B . Thus the head of the arrow on the compass needle is an N pole, but the magnetic field of the earth is roughly what would be produced by a bar magnet at its center with the N pole pointing toward antartica .