Answer:
An electric motor converts electricity into mechanical energy, providing a power source for machinery. A generator does the opposite of this, converting mechanical energy into electricity.
I don't know why it got deleted but I answered again
Hope it helps.....
Have a great day :P