A while back the various disparate energy grids in Australia were more-or-less unified into one big grid (well, a few small grids with intercouples), the NEM was established, and the newly formed company NEMCO tasked to govern it.
The NEM is a bidding market, where various energy providers (and interestingly consumers, more on this later) provide bids detailing how much energy they are willing to provide and at what cost. These bids are placed, I believe, at least one day in advance though they can be revised after being placed.
If a providers bid is successful, its output gets adjusted automatically by the NEM to fulfil the quota allocated to it (note: "NEM" is used to describe both the market and the computer system that manages it, as far as I can tell). The providers will be paid whatever the current 'spot-price' is, regardless of the original bid price.
The spot-price is determined by, essentially, greedily consuming the cheapest energy possible until demand is met. Demand is met when the frequency lies within an acceptable bracket (around 50Hz). So a coal power station with high base-load capacity will place low bids for the majority of its capacity, to ensure that it gets picked first when demand is being met. It costs a lot of money to turn a station like that off, so they price their bids accordingly. Gas turbine engines have extremely low start and stop costs but their operating costs are significantly higher. These turbines will price themselves so that they get turned on only when demand is high and the spot-price has increased accordingly.
During some heatwaves in the summer the spot-price can increase to thousands of dollars per megawatt/hour and it is extremely profitable to have a diesel generator hooked up to the grid to take advantage of precisely these situations.
I mentioned before that some consumers will place bids. The realities of power generation mean that a station shutting down can be a long and expensive process. They need to ensure that someone is buying their electricity so that that doesn't happen. Typically this comes in the form of a brokered agreement with a large consumer, such as an aluminium smelter. The smelter agrees to buy a large amount of energy at a certain price (the details are a bit fuzzy to me) and the station ensures that they never drop below minimum load. The thing is, there is a point where the difference between the spot-price on the market and the brokered purchase price is larger than the value of the aluminium that can be smelted with that energy. When this happens, the smelter shuts down its smelting operations and sells the energy back to the market instead.
Now its not so simple as the greedy algorithm I outlined before, for precisely the same reasons as brokered deals happen - physical and political constraints. It's an incredibly complex job to schedule power station ramp-ups and ramp-downs while still balancing the load, but for the most part it's handled by the NEM. It takes into account renewable energy quotas (what my house mates thesis was on), maintenance shut-downs, water supply (for hydro stations) and much more.
One thing in particular that I found interesting was the cost of transporting the energy. There might be tariffs on intercouples between states, but the main cost is actually the distance the energy has to travel. You can't simply turn a coal power station up when a town in the middle of the desert has a power spike, as the attenuation between those two points (well, the closest station that has excess capacity as a result of the increase) means the demand isn't met. Instead, a diesel generator near the town might need to be turned on, which can be very expensive. The grid has a number of way to mitigate issues like this, but it's still very interesting.
The point is, a well written system makes this market work efficiently, but the domain of the problem is still huge. The (mostly) free market takes care of many of the load balancing issues, however human intervention seems unavoidable because there are simply so many things that can go wrong.
[Edit]
NEMCO is now called the Australian Energy Market Operator (AEMO) and their website is at [0]. It has lots of good stuff to look at for the interested. In particular [1] has lots of nice details about the history and structure of the Australian Energy Markets.
[1] http://www.aemo.com.au/About-the-Industry/Energy-Markets