The Earth's geographic north pole attracts the north pole of a bar magnet.
The magnetic north and south poles of the earth are different from its geographical north and south poles.