Generally dc motor converts electric energy into mechanical energy. A current coil, in a magnetic range, experiences a torque. And this torque rotates the coil. It is purely established on the communication of current and magnetic field.
Workings of a brushed electric motor with a two-pole rotor (armature) and permanent magnet stator. "N" and "S" designate polarities on the inside axis faces of the magnets; the outside faces have opposite polarities. The + and - signs show where the DC current is applied to the commutator which supplies current to the armature coils