As we understand, a magnetic compass has a needle inside it, which is usually a simple bar magnet. The two ends of compass are nothing but the North Pole and the South Pole of this magnet.
These are called so because when freely suspended, one of the ends of the magnet, for e.g North Pole will always point towards the geographical North Pole of the Earth. Hence one end represents geographical North Pole of the Earth and the other geographical South Pole (And this is how one can find directions using a compass).
It is to be noted here that the geographical North Pole of the Earth is the magnetic South Pole (and vice versa) since the magnetic in the compass will always get attracted towards the opposite pole (Earth beng a giant magnetic in itself).