An electric motor converts electrical energy into mechanical energy. The innovation lies in the production of a rotating magnetic field from fixed armature windings with a sinusoidal voltage frequency running through them. Nikola Tesla perfected the uses of this device, resulting in his 1888 invention of the first three-phase electric motor.
Such motors are now everywhere: trains, washing machines, factories...
Note that these machines are reversible, that is, that you can also convert mechanical energy into electrical energy. That's what happens in power plants. The machines used in power plants are called generators, or alternators.