Whether you’re throwing down chips at the blackjack table, betting on the roulette wheel or playing video poker, gambling is a thrilling hobby. But there’s more to a casino than glitzy decor, buffets and stage shows. The real reason casinos are so enticing is their ability to turn tiny odds into giant profits. Casinos make billions each year for their owners, investors, and employees, as well as state and local governments.

Gambling almost certainly predates recorded history, with primitive protodice and carved six-sided dice found in the oldest archaeological sites [Source: Schwartz]. But the casino as a place where patrons could find a variety of ways to gamble under one roof developed only in the 16th century during a gambling craze that swept Europe. Aristocrats and royalty held private parties at places called ridotti, where they bet on games like baccarat, roulette and craps.

Today, casinos are more sophisticated than ever before. They use technology to track and monitor the flow of money, as well as to make sure their customers are following the rules. For example, chip tracking systems keep tabs on wagers minute by minute and alert casinos to any deviation from expected results. And in poker and other games where players are competing against each other, casinos earn a commission that is sometimes referred to as the rake.

Some states have banned gambling altogether, while others have limited it to certain types of establishments such as riverboats and Indian reservations that are exempt from state antigambling laws. But despite these obstacles, the industry has grown to become one of the largest and most lucrative in the world. In the United States alone, the American Gaming Association estimates that 51 million people—more than a quarter of all Americans over 21—visited a casino in 2002.