Across the world, there is a substantial variation on how restaurants are regulated. In developed countries such as the United States and France, there is intense scrutiny of restaurants by public health bodies or by the state.
The main criteria for passing inspections are cleanliness and hygiene, to control foodborne diseases such as E-coli and salmonella. Common reasons for failing an inspection include the incorrect storage of food (often at room temperature), the cleanliness of equipment and preparation areas, and also the hygiene of the staff who are preparing the food; handwashing is where many restaurants fail to pass the test.
Restaurants in less regulated countries are often subject to no inspection. This is especially common in countries where street restaurants are popular. It is mostly a problem for hotter countries, where keeping food sufficiently cold can be an issue.
With regards to alcohol, each restaurant can choose to serve it or not. If restaurants opt to serve booze, and the majority do, as it can significantly boost profits, then a special licence needs to be applied for. Certain places have a bring your own policy, where alcohol can be consumed, but not purchased on the premises.