The electric motor converts electric energy into mechanical energy and therefore can be considered the counterpart to the generator (conversion of mechanical energy to electric energy). The way the electric motor functions is based on physical principals. As soon as a current flows through a conductor, a magnetic field is produced. In reference to the electric motor, this conductor is the coil of the rotor. For example if the negative pole of the stator stands opposite the negative pole of the rotor, they repel each other. Consequently, a rotation occurs. However, as soon as the rotor reaches the positive pole of the stator, a standstill occurs due to the pull of heterogeneous magnetic fields. The commutator, or reversing switch will change the magnetic field of the stator, which can then lead to the conversion of electric energy into mechanical energy as the homogeneous magnetic fields repel each other.