Electric motors are machines that transform electrical energy into mechanical energy. They generate force in the form of torque on the motor's shaft by interacting between the magnetic field of the motor and electric current in a wire winding. Direct current (DC) from a battery or alternating current (AC) from an electrical power grid or generator can be used to power motors.