For an up-to-date, country-by-country listing of passport requirements around the world, go to the "Foreign Entry Requirements" Web page of the U.S. Department of State at http://travel.state.gov.
Citizens of the United States, Canada, Great Britain, and most European nations may visit Costa Rica for a maximum of 90 days. No visa is necessary, but you must have a valid passport, which you should carry with you at all times while you're in Costa Rica. Citizens of Australia, Ireland, and New Zealand can enter the country without a visa and stay for 30 days, although once in the country, visitors can apply for an extension.
If you overstay your visa or entry stamp, you will have to pay around US$45 (£23) for an exit visa. If you need to get an exit visa, a travel agent in San José can usually obtain one for a small fee and save you the hassle of dealing with Immigration. If you want to stay longer than the validity of your entry stamp or visa, the easiest thing to do is cross the border into Panama or Nicaragua for 72 hours and then reenter Costa Rica on a new entry stamp or visa. However, be careful: Periodically the Costa Rican government has cracked down on "perpetual tourists"; if it notices a continued pattern of exits and entries designed simply to support an extended stay, it might deny you re-entry.
If you need a visa or have other questions about Costa Rica, you can contact any of the following Costa Rican embassies or consulates: in the United States, 2114 S St. NW, Washington, DC 20008 (tel. 202/234-2945; www.costarica-embassy.org for consulate locations around the country); in Canada, 325 Dalhousie St., Suite 407, Ottawa, Ontario K1N 5TA (tel. 613/562-2855); and in Great Britain, 14 Lancaster Gate, London, England W2 3LH (tel. 020/7706-8844). There are no Costa Rican embassies in Australia or New Zealand, but you could try contacting the honorary consul in Sydney, Australia, at Level 11, De La Sala House, 30 Clarence St., Sydney NSW 2000 (tel. 02/9261-1177).