A magnetic compass needle pointing North and South shows deflection when a bar magnet or a current carrying loop is brought near it. This happens because the magnetic fields of the compass needle and the bar magnet (or current carrying loop) interact with each other.
Salient features of magnetic field lines:-
(1) Magnetic field lines follow the direction from the north pole to the south pole.