European Union (EU) Regulation 261/2004 of 17. February 2005 gives certain rights to passenger on all flights, schedule or charter and flights provided as part of a Package Holiday. It only applies to passengers flying from an EU airport or from an airport outside the EU to an EU airport on an EU carrier.
Overbooking is the practice of accepting reservations for a flight from more people than can fit on the plane. Almost all airlines overbook their flights, as statistically some percentage of passengers do not show up for the flight.
It does happen, though, that more people check in than can fit on the plane. When this happens, the airline staff will ask passengers to volunteer, either at the checkout counter or after the plane is full, to remain behind and take another flight. If your travel plans are flexible (such as on the homeward leg of your excursion), you may wish to volunteer, to receive the compensation that airlines usually offer to get out of this predicament. If there are no volunteers, passengers will be chosen by the airline to stay behind (usually the last passengers to arrive). "Bumped" passengers are almost always offered passage to their destination by some other route or on a later flight; it is common for airlines to offer a voucher for a substantial discount on a future flight, or even cash, in compensation for the inconvenience. If an overnight stay is required, the airline will usually pay for a hotel and meals during the delay. Your rights are regulated at the country level; some airlines may offer additional compensation (but their policy on this is rarely published).
Compensation for denied boarding for flights in the European Union is €250 for flights < 1500Km, €400 for 1500-3500 Km, and €600 >3500Km (half if the delay is less than 2, 3 or 4 hours, respectively) in addition to an alternative flight or a refund of the ticket . One way to reduce the risk of overbooking is to check-in very early, either by Internet or by telephone before arriving at the airport.
When a flight is cancelled, the reason given is usually some kind of technical or weather-related problem. Sometimes the real reason is that so few passengers have checked in that is cheaper for the airline to cancel the flight and rebook the passengers on a later flight, or even on another airline. If a flight is cancelled, the airline is obligated to get you on the next available flight to your destination, but interpretations of "next available" vary and, for some low-cost carriers like Ryanair, this may mean a long wait indeed. Unlike with overbooking, passengers are not legally entitled to any compensation except the unplanned expenses of food and hotels.