The stationary part of the generator is a set of coils, and inside is the rotor which has a magnetic field. The rotating magnetic field exposes the coils to a continually changing magnetic field with induces a voltage within them. When the coils are connected to an electrical power system, that voltage causes a current to flow and the generator is producing electricity. That current flow produces its own magnetic field which opposes the one that created it and creates drag on the rotor. The energy to overcome this drag and keep the rotor spinning is what the wind/steam/combustion gases are used for.
Latest Answers