The answer to 'how does generator work' is that a generator is a machine that converts mechanical energy into electrical energy. Generators work by using an engine, such as a gasoline or diesel engine, to spin a rotor inside a stator. This spinning motion creates a magnetic field that induces an electric current, which is then sent out as usable electricity.
Generators are commonly used as backup power sources during power outages or as primary power sources in remote locations without access to the electrical grid. They can power homes, businesses, and other facilities by providing a reliable and consistent source of electricity.