Official lottery games are government-sanctioned games of chance in which prizes (typically money and goods) are awarded according to the drawing or distribution of tickets. Many governments have laws regulating their operation, and the details of how they work vary widely. In general, the organizers are responsible for advertising the lottery, producing and selling tickets, and collecting the winnings.

The lottery is a popular way for states to raise funds for a wide variety of projects, from education to public works. But critics say that the system is inefficient and unfair, and can end up transferring wealth from low-income communities to wealthy ones.

Traditionally, a prize in a lottery was a fixed amount of cash or goods, but modern lotteries take several forms. Some have a single winner or a small number of winners, while others have multiple prizes that are awarded based on the number of tickets sold. Regardless of the type, the amount of money raised from ticket sales is typically much larger than the sum of the prizes paid out, so the state or sponsor earns a profit.

Lottery games have been around for centuries, with the first recorded signs of them appearing in a Chinese book of songs from 205 to 187 BC. But until after World War II, when casinos began to appear worldwide and the lottery gained popularity as a way to avoid raising taxes, most countries banned them.