People of all nationalities require a visa for Lebanon bar Gulf countries (but not Yemen). Nationals of Australia, Austria, Belgium, Canada, Cyprus, Denmark, Finland, France, Germany, Greece, Gulf Cooperative Council (GCC) countries, Ireland, Italy, Japan, Luxembourg, Malaysia, Monaco, Netherlands, New Zealand, Norway, Portugal, South Korea, Spain, Sweden, Switzerland, the UK and the USA can get a tourist or business visa on arrival at Beirut International Airport, or at the border with Syria.
Lebanon denies entry to travellers with evidence of a visit to Israel in their passport. Look out for the question 'Have you ever visited Israel or Occupied Palestine?' on some visa application forms - a 'yes' will put paid to your application.
Note that visa rules and regulations can - and do - change in Lebanon; always check the latest information with your embassy/consulate.
At the airport, visa stamps are sold at a window on the right (open 24 hours), just before passport control. Visas for 48-hour transit and one-month visas are issued free of charge; a three-month visa costs US$34. Note that the 'three-month' visa requires you to extend this before the end of your first month. Visas (including multiple-entry visas, which are useful if you're planning to go in and out of Lebanon from Syria) can also be obtained in advance at any Lebanese embassy or consulate.
Those wishing to study in Lebanon can apply for a student one-year residence visa (LL250, 000) with a letter from the school, two passport photos and two copies of your passport details.