What happens to the needle of a compass kept nearby when electric current is switched on in a wire? Why does this happen?
The current flowing in the wire gives rise to a magnetic field around it which exerts a force on the compass needle (which itself is a tiny magnet) kept nearby and deflects it.