The mechanical torque supplied through the shaft of a generator represents an amount of energy that, as we all know, cannot be stored so the exit point is the kW output of the generator.
The mechanical power is usually a slow changing parameters when compared to the electric power changes seen on a bus.
Now what happens when the power output suddenly changes in situations such as a fault or a major load rejection?

The unbalance between the energy coming in and energy going out needs to be dispersed in some form. The rotor speed is the path found to regain energy balance until the governor control takes over.
During this time, if the electrical energy is lower than the mechanical power the rotor will tend to accelerate. The amount of acceleration is proportional to the power unbalance, the shaft inertia, and the time. When the energy balance is restored, the rotor has to revert to its original position.If it was accelerating it needs to decelerate and vice versa.
Once again its inertia will prevent it from immediately regaining position and if it was accelerating the rotor angle will keep increasing until the rotor starts to decelerate. If one of the involved parameters was too big (time, inertia, unbalance level) and the rotor goes in an angular position where its electrical power falls below the mechanical power (somewhere above 90 Degrees) the generator reaches what is called a loss of synchronism and will slip a certain number of poles!
The automatic voltage regulator response (AVR) and particularly its ceiling or forcing ratio is fundamental in reacting to these changes as it has the ability to dynamically change the level of Pmax and thus increasing the area available for the rotor to decelerate without reaching the critical point