Beneath the glitter of flashing lights, free drinks and bling, casinos stand on a bedrock of mathematics engineered to slowly bleed patrons of their cash. And despite the fact that most people walk away empty-handed, casinos do a bang-up business.

Casinos make money by charging players a “vig,” or commission, for playing their games. They also earn revenue by providing free goods and services to big bettors, known as comps. These might include free show tickets, rooms, meals and even limo service. A casino’s vig is calculated from the expected return of all bets placed, not just the ones made by big bettors.

Gambling is not for everyone, but for those who do enjoy it, it can be a fun experience and a great way to socialize with friends. For most, however, the thrill is fleeting and the losses can add up quickly. The best strategy for those who want to gamble is to start with a fixed amount of money they are prepared to lose, and play conservatively.

In games where there is some element of skill, such as blackjack or Spanish 21, the house edge can be reduced to almost zero by using simple strategies. Before entering a casino, learn these strategies by watching others, taking free lessons and reading up on the rules of each game. It’s also important to be courteous with dealers and other players, and to follow the rules of each game. For instance, never grab winnings that aren’t pushed toward you by the dealer.