A motor is a machine that converts electrical energy into mechanical energy.
The motor works on "Fleming’s left-hand rule".
Fleming's left-hand rule: When current flows through a conducting wire, and an external magnetic field is applied across that flow, the conducting wire experiences a force perpendicular both to that field and to the direction of the current flow (i.e. they are mutually perpendicular).
The Thumb represents the direction of the Thrust on the conductor/Motion of the Conductor.
The Forefinger represents the direction of the Magnetic Field.
The Centre finger represents the direction of the Current.