The needle in the compass gets attracted by the magnetic poles and indicates the geographical poles of the Earth.
Why does a compass needle get deflected when placed in a magnetic field? is it because the north pole of the compass needle and north pole of the magnet deflect?