The answer to 'how does generator work' is that a generator is a machine that converts mechanical energy into electrical energy. It works by using an engine, such as a gasoline or diesel engine, to spin a rotor inside a stator. This creates an electromagnetic field that induces an electrical current, which is then sent out as usable electricity.
Generators come in a range of sizes, from small portable units to large industrial generators. They are commonly used as backup power sources during power outages, to provide electricity for remote locations, or to power heavy-duty tools and equipment. Generators require regular maintenance, such as changing the oil and air filters, to keep them running efficiently and safely.