Budgeting is an important aspect of film production.
During script development, filmmakers produce a rough budget to convince film producers and film studios to give them a greenlight for production. During pre-production, a more detailed film budget is produced. This document, which could be over 150 pages long, is used to secure . Multiple drafts of the budget may be required to whittle down costs.
A budget is typically divided into four sections: above-the-line (creative talent), below-the-line (direct production costs), post-production (editing, visual effects, etc), and other (insurance, completion bond, etc).
The budget as an advertising tool
For blockbuster movies, high budgets are advertised to imply that the film will be worth watching. On the other hand, El Mariachiwas advertised as having a shoestring budget of $7,000. El Mariachi's actual budget including the distribution costs far exceeded $7,000. (It should be noted that the festival print of El Mariachi was in fact made for $7,000 - the additional budget expenditures came when the movie was picked up for distribution by a studio.)
Going over budget
In the US film production system, producers are not allowed to exceed the budget. Exceptions have of course been made, one of the most notable examples being Titanic. Director James Cameron ran over budget and offered his fee to the studio. In other countries, producers who exceed their budget tend to eat the cost by receiving less of their producer's fees. While the US system is profitable and can afford to go over budget, other countries' film industries tend to be financed through government subsidies.
Though movie studios are reluctant to release the precise details of their movies' budgets, it has occasionally been possible to obtain (clandestinely) details of the cost of a films break down.
Total: $118 million
Source:  http://www.edwardjayepstein.com/laracroft1.htm
Total: $187.3 million
Source:  http://www.edwardjayepstein.com/budget.htm
Source:  http://www.guardian.co.uk/film/20