The frequency is closely related to the real power balance in the overall network. Under normal operating conditions the system generators run synchronously and generate together the power that at each moment is being drawn by all loads plus the real transmission losses.
The latter, amounting usually to a few percent, consist of ohmic losses in transmission component, corona losses on the lines, and core losses in transformers and generators.
We must remember that the energy is being transmitted at almost the velocity of light, and since it is not being stored somewhere in the system in electric form. It is concluded that the electric energy production rate must equal the consumption rate at each moment of time.
Should power balance not exist then the difference would enter into or exit from kinetic energy storage. As the kinetic energy depends upon generator speed, a power imbalance will thus translate into a speed (and frequency) deviation.
As an analog, consider a freight train consisting of many engines and a string of freight cars. It is desired to keep the velocity of the train controlled at constant speed in spite of the fact that train will experience fluctuating grades along its course.
The engine power corresponds to the generator power output in the electric system and the freight cars represent the electric loads.
If the total engine power exceeds the total pull exerted by the freight cars the speed will increase as the difference is transformed into kinetic storage. A shortage of engine power results in a slowdown.
The rate of the speed change depends upon the magnitude of the power imbalance and train inertia. In the electric system, we should have a momentary surplus of generator power over load the total speed will increase.
The rate of the speed increase would depend upon the amount of surplus power and the total moment of inertia of the running equipment. All tens of thousands of motors which during these moments were being supplied by the network would speed up, and they would all meet higher load torques, thus requiring the motors to pull more power from the network.
The resulting load increase would soon balance out the load decrease that started the whole chain of events, and the frequency would level off at a new higher value.