If a current carrying conductor is lying perpendicular to a magnetic field, then the interaction of current flowing through the conductor and the magnetic field present will produce mechanical force upon the conductor (and therefore, mechanical energy). Its value is given by:
F= B*i*L Newton
where B is the density of the magnetic field, l is the length of conductor, and i the value of current flowing in the conductor. The direction of motion can be found using Fleming’s Left Hand Rule.
When a current carrying coil is placed in a magnetic field, the force acts on it according to Fleming’s left hand rule, as a result, it starts rotating. In an actual DC motor, several such coils are wound on the rotor, all of which experience force, resulting in rotation. The greater the current in the wire, or the greater the magnetic field, the faster the wire moves because of the greater force created.