A magnetic compass is an instrument that is used to find the directions. Different directions (north, south, east and west) are marked on the compass.
We know that our Earth is considered as a huge bar magnet with its North and South Poles aligned along the geographical South and North Poles, respectively. Hence, the North Pole of the magnetised needle in a magnetic compass is attracted towards Earth’s geographic North Pole. Similarly, the South Pole of the magnetised needle is attracted towards Earth’s geographic South Pole. Hence, the magnetised needle of a magnetic compass always aligns itself along the north–south direction. Thus, in this way we can read the desired direction on the compass.