Let's say you're in the Atlantic ocean sailing, and your ship goes down, all you have is a magnetic bar. How do you get home safe!?
Lucky for you, there's an old trick that Chinese sailors used as far back as the 12th century. Just float the bar magnet on a little piece of wood in a bucket of water. Wait a minute, and you will find the magnet's North Pole is pointing north! You've constructed a simple compass.
The entire earth is surrounded by its own magnetic field. If a bar magnet is allowed to move freely, it will line itself up with the earth's field. The opposite poles of earth and bar magnet will attract, and the like poles repel.
The only question left, is why would a North Pole on a bar magnet point north if like poles repel?
Well, the North Pole on a compass needle is actually its South Pole. It's labeled north for convenience sake, because that's the end that points north. The little "N" really means "this pole points North."