A casino is like an indoor amusement park for adults. It offers a variety of games, luxurious hotel rooms and non-gambling entertainment options. However, casinos wouldn’t exist without gambling, which brings in billions of dollars in profits every year.

Gambling almost certainly predates recorded history, with primitive protodice and carved six-sided dice found in archaeological digs. But the modern casino, where people find a wide range of ways to gamble under one roof, didn’t appear until the 16th century as part of a gambling craze that swept Europe. Italian aristocrats created private clubs called ridotti, where they could legally gamble and hold parties.

Casinos have many security measures in place to keep their patrons safe. Security personnel patrol the floor and look for blatant cheating such as palming, marking cards or switching dice. Pit bosses and table managers monitor tables with a wider view, making sure the rules are being followed and that patrons aren’t betting in ways that signal their intent to cheat.

Each casino game has a built-in mathematical advantage for the house, which ensures that casinos will make money over time. That advantage may be very small—less than two percent in some cases—but over millions of bets it adds up to huge profits for the owners. The edge is why casinos offer huge inducements for high bettors, such as free spectacular entertainment, luxury living quarters and reduced-fare transportation.