A generator converts mechanical energy into electrical energy, while a motor does the opposite - it converts electrical energy into mechanical energy. Electric motors work on the principle that a conductor carrying electric current will experience a force in a magnetic field while generators work on the principle of electromagnetic induction.