Theory:
Electric motor brakes can basically make an electric motor turn backwards. The motor brakes supply the electric motor with an external force, instead of an electric force to make the shaft in the motor run. This external force is usually applied by the wheels of the car that generate electricity.
Working:
There are two separate coils of wire in a motor that are located constructively around a permanent magnet which is connected to the central shaft. When electricity passes through these wires, a magnetic field is generated that makes the motor work. The central magnet alternates and results in a continuous feeling of rotation on the magnet. As per the alignment of the central magnet, the magnetic field turns on and off consecutively, thus making the magnet turn.