When no electric current is passed in a conductor and the conductor is placed in a magnetic field, no magnetic force will act on the electrons because the motion of electrons in the conductor is random motion and their average velocity is zero. And when current is passed in the conductor, the free electrons acquire drift velocity in a definite direction and hence magnetic force acts on them.