When a Magnetic needle is suspended freely, it always aligns itself in the direction of magnetic north and south pole of the earth, the north pole of the needle gets attracted towards the magnetic south pole of the earth and the south gets repelled equally away from it. So two equal and opposite forces acting on the needle should cancel each other which does not happen because the:
Though two equal and opposite forces are acting on the needles, they don't cancel each other as they act on two different points and they generate torque which later at proper alignment reaches equilibrium such as
∑F=0 and
∑M=0