What is the function of the generator in the manufacturing of electricity

The function of a generator in the manufacturing of electricity is to convert mechanical energy into electrical energy. It does this by using the principle of electromagnetic induction. The generator consists of a rotating shaft that is driven by a turbine or any other mechanical source. As the shaft rotates, it turns the rotor, which is a coil of wire located inside a magnetic field. This rotation induces a current in the wire, generating electricity. The generated electricity can then be used to power various electric devices and systems.