An electric motor converts electrical energy to mechanical energy. The motor uses an electromagnetic field to create rotational motion in its output shaft. When an electric current passes through the wire coils of the motor, a magnetic field is generated. The magnetic field interacts with the field generated by a stationary component of the motor, causing the rotor to rotate. This rotation creates mechanical energy in the form of rotational motion, which can be used to power various machines or devices. Therefore, the conversion of electrical energy to mechanical energy is the main function of an electric motor.