Between these two devices are several differences. There are differences between the roles they develop, the type of electric current used to generate power, and the operating principle.
The operating principle of a DC motor is that a magnetic force exerts a magnetic field on a conductor with electric current. In this case, when the current flows in the coil, which is located inside a magnetic field, and produces the action of a torque, the coil is made to rotate. By this operating principal, the role of a DC motor is that it transforms electrical energy into mechanical energy.
For its part, the AC generator uses the operating principle of electromagnetic induction. By this principle, when a conductor moves in a magnetic field, a potential difference is induced in the conductor ends. In this case, the coils are rotated in the magnetic field by means of an external force. The result is that an electromotive force is generated at the ends of the circuit. By this operating principle, the role of an AC generator is that it transforms mechanical energy into electrical energy.