Gambling was a game of chance and form of recreation that involves betting with currency such as tokens (or chips), money, or latinum, on the outcome of betting games or betting pools. Casinos are popular venues for gambling.
The United Federation of Planets prohibits gambling within its territories. However, the Bajoran Provisional Government has legalized gambling within Bajoran territory. Deep Space 9 is only administered by Federation personnel as per an agreement with the Bajoran government, but falls under Bajoran legal jurisdiction and customs (such as operating on a 26 hour day, and extradition treaties signed by the Federation are not in effect on DS9). Therefore, Quark is still allowed to operate his casino on DS9, because it is legal under Bajoran law.
In 2371, Dr. Bashir ordered Major Kira to relax during a particularly stressful period. With the assistance of Quark, Bashir prescribed several means of relaxation, which included a small stack of gambling tokens to use for gambling. (DS9: "Defiant")
Although the odds are typically in the favor of the "house", a skillful player may go home a winner. Other times, a not-so-skilled played may accrue quite a debt.
Someone who is often quite skilled at a game but feigns their true abilities are often called "hustlers". Notable hustlers include Jake Sisko at dom-jot and Kathryn Janeway at pool. (DS9: "The Abandoned"; VOY: "The Cloud")