What is it?
Economists think of any economy as having and demand side as well as a supply side. The supply side can be thought of as the ability of the people in the economy to produce the goods and services that consumers want. The demand side, therefore, is the willingness of consumers to buy the goods and services that can be produced.
When the two are equal and demand equals supply, that is to say, consumers wish to buy the precise quantity of goods and services that producers are capable of providing, this is called equilibrium, and everyone is happy.
Why is it needed?
In the old days, it used to be believed the economy would find equilibrium all on its own. It was assumed that if demand for goods was too low, prices would fall, and so people would buy more stuff. If people were unemployed, wages would fall, and companies would employ more workers. If there was too much demand for anything, prices would rise, and demand would fall. If anything in the economy was in disequilibrium, some factor would change, and the economy would return to equilibrium, as if by magic.
This wisdom was expounded in 1931 by Fisher in "The purchasing power of Money", who saw it as a necessary reality; an accounting equation, the amount earned must always equal the amount spent. There could be no mechanism by which a change in the money supply changed quantities of goods traded, it was always off-set by a change in prices.
However, this was not universally accepted. Just because what is bought equals what is sold, it does not mean other factors are not being influenced by changing demand. David Hume had noticed the tendency of the economy to go through phases of rising and falling prices. He notices that when prices were rising, "labour and industry gain life; the merchant becomes more enterprising, the manufacturer more diligent and skilful, and even the farmer follows his plough with greater alacrity and attention" (Hume, Essays on Economics, of Money).
The reasons for such phenomena were expounded upon by Keynes to explain the phenomena of the Great Depression. What was witnessed was falling prices, high unemployment and contracting output. The majority of economists were claiming that output was contracting because wages and prices were not falling fast enough, in stubborn defiance of the common sense understanding that unemployment meant people were poor, and just couldn't buy all stuff factories were making, no matter how cheap it was. In fact, as Keynes pointed out, falling prices meant people would spend even less - if you think something is going to cost less tomorrow, why waste money buying it today?
The solution to such a dilemma of spiralling unemployment, lower spending, falling prices and failing businesses must be that the government must encourage or even take over the role of the consumer, and spend for him.
How does it work?
Governments have an interest in maintaining a stable economic environment in order to keep unemployment low and inflation stable. They do this with demand-side policies, which alter the amount of money being spent and invested, either directly, or though influencing people’s behaviour.
Central Banks have always played a role in controlling prices and therefore influencing demand. They can do this by buying and selling bonds. A bond is a continuous stream of income, a promise to give the holder of the bond a set amount of money a year. Ignore this flow of income for a moment, only look at the price of the bond: when the Central Bank buys a bond, it immediately gives money to the seller, some rich person, so money enters circulation in the economy. When it sells a bond, it immediately takes money away from our rich investor, and so money leaves the economy.
If you've ever wondered how the government goes about printing money to pay of its deficit, it is by making the Central Bank buy a bond which gives no flow of income.
Central banks often also set interest rates. This is usually the rate at which the Central Bank lends money to commercial banks, the ones on the High Street, whose cash machines we use, (and from whence one takes out a mortgage, and all manner of loans, unless you're a desperado who uses credit card companies.) High interest rates increase mortgage repayments, discourage people from borrowing money, and encourage them to save it. Low interest rates do the opposite.
In this way Central banks change the amount of money in circulation. More money means more spending, less unemployment and more inflation. Less money means more unemployment, less inflation.
These effect the economy in a more complicated way. In general, a Central Bank can determine the exchange rate by buying and selling its country's currency against other currency. By making its currency cheap, it makes domestic goods cheaper than foreign goods, so exports rise and imports fall. So a cheap currency will stimulate demand. If the currency is expensive, on the other hand, the opposite will be the case, and there will be a strong anti-inflationary effect on prices.
However, this is not always the case. Where a country is dependant upon imports of food and raw materials with a very low price elasticity of demand, an expensive currency may mean it can import all it needs for a lower price, improving terms of trade and so raising incomes, so demand rises.
Exchange rate policy has very important implications for long term growth in an economy, and so is very disruptive when used as a tool for controlling inflation. Often in the past demand-side management was subordinated to exchange rate policy - see Trilemma and The Gold Standard.
Governments use taxes to fund their spending. But since the 17th Century governments have been able to borrow fairly reliably, and have not had to balance their budgets every year.
By raising taxes a government reduces the level of demand in the economy, and by lowering them it increases demand. However, not all taxes do the same thing. A tax on imports will raise the cost of raw materials in an open economy, and so may lead to inflation. Taxes on the rich lower inflation less that taxes on the poor as the poor spend more of their income than the rich.
Taxes are a much sharper and more reliable way of influencing demand than interest rates, which are often compared to pulling a brick with a piece of elastic; you don't know the effect of your policies until its too late.
The great thing about money is you can use it to buy stuff. You know, stuff you like! Governments can do it as well as individuals. They have always needed to pay the army and the bereaucracy, and these days most countries have state education systems, and some have health care paid for by the state. On top of that, governments build roads, libraries and universities, and provide unemployment benefit, pensions and other social services.
This all has an effect on aggregate demand, but it generally cannot be turned on and off like a tap, as if you stop funding a hospital, those who survive may get quite upset with you.
On the other hand, both taxes and spending form what is know as the "Automatic Stabilisers". When the economy is booming, you get more money from taxes as incomes are rising and more people have jobs. You also don't have to give as many people unemployment benefit. When the economy is in recession, tax receipts fall as people lose their jobs, and spending rises as you pay out dole. This means the government is pumping money into the economy when times are bad and sucking it out when times are good, without even trying.
Is all this information useful in any way?
I've tried to cover this subject in a way that is simple and complete. It can be helpful to understand the state of the economy and how it is likely to change if you run any kind of business, to inform your expectations.
It’s also socially responsible to inform yourself as a voter - understand what politicians are talking about, or rather avoiding talking about. One of the big debates of the past century is the extent to which the government should involve itself in demand side management - some see any interference as a breach of liberty, some think it should be left to the central bank, some think it should be any governments priority, and some think the government should give up playing around with figures and just take over running everything in the country.
Just remember, there are big social issues at stake in this debate. Less government activity means worse periodical recession, and greater freedom means greater inequality. Economics is the battlefield of ideologies.