A diesel generator is a type of generator that uses a diesel engine to convert mechanical energy into electrical energy.