Electricity cannot be stored at scale easily, so supply and demand must match second by second.
Frequency
Grid frequency indicating balance.
Which falls when demand exceeds supply and rises when it does not.
Balancing mechanisms
Generators paid to increase or reduce output at short notice.
Which operates as a continuous market.
Demand forecasting
Predicting consumption hours and days ahead.
Which includes weather and television schedules.
Renewables and intermittency
Variable generation requiring more flexible balancing.
The scale of the problem
Every time a large number of people switch something on at once, generation somewhere must respond within seconds.
Which is achieved through a combination of automatic response from generators and a market operating in short intervals.
Operators forecast these events, including predictable ones like the end of major broadcasts, and position reserve accordingly.
Inertia
Rotating mass in conventional generators resisting frequency change.
Which is reduced as those plants retire.
Storage
Batteries and pumped hydro providing fast response.
Which has grown substantially.
Interconnection
Importing and exporting between regions.
Demand flexibility
Consumers paid to shift usage.
Why frequency is the signal
Generators are physically synchronised; when demand exceeds supply they slow fractionally, and the frequency drops.
Which gives operators a continuous real-time measure of whether the system is in balance.
Everything else in grid operation is arranged around keeping that number within a narrow band.
Reserve services
Capacity held ready to respond within seconds or minutes.
Which is procured through markets.
Blackouts
Protective disconnection when balance cannot be maintained.
Which is a designed response rather than a failure of design.
Renewable integration
Forecasting wind and solar output.
Which has improved substantially.
What consumers can see
Grid operators publishing live generation mix data.
What consumers can actually see
Most national grid operators publish live data showing generation by source, demand and sometimes carbon intensity.
Which is genuinely interesting and freely available.
Watching demand rise in the early evening and generation respond makes the whole system considerably more legible than any explanation does.
Time of use tariffs
Prices varying through the day.
Which passes the balancing problem to consumers as an incentive.
Home batteries and vehicles
Distributed storage participating in balancing.
Which is developing.
Grid investment
Transmission capacity as a constraint on renewable connection.
Which is a significant bottleneck in several countries.
Reliability
Developed grids achieving very high availability.
Why it is worth knowing how these things work
Most of the systems that shape ordinary life are invisible by design. Nobody explains why a parcel took an odd route, why a film left a streaming service, why a wait in an emergency department extended, or why the price of a flight changed between two searches.
The absence of explanation is rarely deliberate concealment. It is that the people running these systems are solving their own problems, and the reasoning behind their decisions is obvious to them and completely opaque from outside.
Understanding the mechanism does not always change what you can do about it. It does remove a category of low-grade frustration that comes from assuming something is arbitrary, unfair or aimed at you personally when it is usually none of those things.
A note on sources
Where regulation is involved, national regulators publish the actual rules and they are generally clearer than press coverage of them. Where an industry is involved, trade publications aimed at people working in it are considerably more informative than consumer coverage.
Practices described here vary substantially between countries, and anything with legal, financial or medical consequences warrants checking against the rules that apply where you are.
The pattern that recurs
Across almost all of these systems, the same three things turn out to be true. The behaviour that looks irrational from outside is optimising for something the observer cannot see. The cost that seems unexplained is usually concentrated in one specific stage of the process. And the information that would resolve the confusion is generally published somewhere and read by nobody.
That last point is the most useful one. Regulators, operators and industry bodies publish an enormous amount of explanatory material that answers exactly the questions people complain about not being able to get answers to. It is dry, it is not promoted, and it is free.
What to do with any of this
Very little of it changes a decision on its own. What it changes is the ability to ask a better question: of a company, of a service, of a regulator, or of yourself before assuming that something went wrong.
A final caveat
Everything above describes general practice. Individual companies, jurisdictions and circumstances differ, sometimes substantially, and the rules change more often than summaries of them get updated.
Where a decision matters, the official source for your own country is worth the ten minutes it takes to check.
Where to read further
Trade publications written for people working in an industry are consistently the most informative public source on how it operates, and most of them are freely readable.
They assume knowledge that general coverage explains and skip the framing that general coverage adds, which makes them harder to start with and considerably more useful once you do.