Generators transform mechanical work (like rotation) into electrical output. Electric motors perform the opposite function, converting electrical energy into mechanical energy.