A generator is a device that converts mechanical energy into electrical energy by using magnets and copper wire coils to produce an electrical current. The mechanical energy can come from a variety of sources, such as a combustion engine, wind turbine, or water turbine. Generators are commonly used in power plants to produce electricity on a large scale, as well as in portable devices such as camping generators and backup generators for homes and businesses. They can be powered by various fuels such as gasoline, diesel, natural gas, and propane.