Many cities, states and countries outside have greater expenditure than revenue, a gap which is often projected to widen as time passes.
Quantification
Government deficit is often measured as a percentage of the GDP, which is much larger than the actual income of the government alone. Anything over 10% is considered too high.
Expectations without willingness to spend
Often people expect unrealistically good public services from the government, without the willingness to spend a proportionate fraction of their income. So, politicians in many countries are elected based on promise to increase or maintain public services while reducing (rather than increasing) taxation - this results in the perpetuation of a budget crisis.
This is especially the case in countries where the affected taxpayers have significant say in choosing their rulers.
Long term solution
The long term solution involves reducing expenditures (downsizing government services), increased taxation, later retirement age etc..
Increase burden on the rich
In the case of democracies and socialist countries, one solution is to place a higher tax burden on the rich. But, people in countries characterized by a phobia of socialism or by general optimism where people are rich or expect to become rich, this is rejected.
Short term solution
Temporary measures to combat it include borrowing money by issuing bonds, or, in the case of countries - creating money as explained elsewhere.
Sovereign debt
Treasury bonds are issued by national governments to borrow money, they return the principal with a very small interest.
Defaults
Sovereign debt is generally considered to be very secure - as the government can repay debt under normal circumstances by printing new money.
But in some cases, the country is so indebted that printing money will lead to currency devaluation/ inflation with very bad socio-economic consequences. So, sometimes countries default on their commitment to pay back debtors.
Default Consequences
When a government defaults on its debts, it can only acquire loans under much harsher, tougher conditions.
Rescue
Troubled governments, not wanting to default - or wanting to default gracefully, are often rescued by friendly countries/ organizations like IMF and EU lending money, under conditions which discourage future budget deficits - such as raising interest rates on future government bonds, and other long-term solutions mentioned earlier