Like magnetic poles repel, unlike magnetic poles attract. So the magnetic south and magnetic north of two bar magnets will attract. Therefore, though the compass needle points towards the magnetic north, it is actually the magnetic south pole of the compass needle that is pointing towards the magnetic north.