Some Poskim rule it is forbidden to gamble [with a Jew] due to a Rabbinical stealing prohibition. Other Poskim rule there is no stealing prohibition involved in gambling even with a Jew, just as is the law by a gentile [as explained next]. (Nevertheless, even according to this opinion, there is a prohibition involved in doing so.) [Thus practically, according to all opinions, it is forbidden to gamble either on Shabbos or during the week, and the dispute is only in regards to the severity of the prohibition. It is forbidden to gamble even on mere occasion, as a onetime occurrence, and not only when one does so as a hobby. This prohibition is intensified if one does so as an occupation to support himself.]
With a gentile: There is no stealing prohibition involved in gambling with a gentile. Nevertheless, there remains a separate prohibition involved in spending one’s time involved in matters of nonsense, as it is not befitting of a person to deal with such matters. Rather, throughout one’s life he is to be involved in matters of wisdom and matters that contribute towards civilization.
Definition of gambling:
Gambling is defined as any game in which two players stipulate that the winner will receive such and such an item from the loser [whether it is money or an object].
Betting: Making bets with each other is considered like gambling and is hence forbidden to be done. In the event that one transgressed and made a bet he may retract from the bet so long as the money has not yet been given to a third party. If however he promised to donate the money of his winnings to charity, then he may not retract from the bet.
Invalidation for testimony/Eidus:
One who transgresses the above prohibition and gambles is Rabbinically invalid for being a witness in any Halachic matter that requires testimony. Such a person may not be used as an Eid/witness for a wedding, Kesuba, Get, monetary dispute which is brought to Beis Din, and any matter of the like in which Kosher witnesses are required.
The type of gambling that invalidates: One is only invalidated for testimony if he gambles as his only set occupation and supports himself from the proceeds of his winnings. If however he has another occupation from which he supports himself, then he is not invalidated if he gambles, even though it is forbidden to do so. If he does not have an occupation, but lives off his savings without needing to support himself with the gambling money, it is disputed as to whether he is invalidated. Likewise, if he has an occupation, but it does not suffice to fully support him, and he hence uses some of the gambling money’s towards his livelihood, then it is disputed as to whether he is invalidated.
There is a prohibition involved to gamble either on Shabbos or during the week, whether as a onetime occurrence mere occasion or as a continuous hobby, or as an occupation, and whether with a Jew or with a gentile. One who gambles on a consistent basis and does not have another occupation from which he lives off, is invalidated as a witness.
May one play lottery games?
Yes. Playing the lottery is not considered gambling and is permitted according to Halacha.
May one play cards for money?
No. This is considered gambling
May one play Dreidal for the sake of money?
No. This is considered gambling.
 Admur Gzeila Ugineiva 31; Areas in Talmud and Shulchan Aruch that the Issur of gambling is discussed: Mishneh Rosh Hashanah 22a and Sanhedrin 24b; Orach Chaim 322/6; Choshen Mishpat 34/16 [laws of testimony]; Rama Choshen Mishpat 207/13 [laws of Asmachta]; 370/2-3 [laws of stealing]
The Mishneh states that one who gambles is invalid for testimony. [Mishneh Rosh Hashanah 22a and Sanhedrin 24b] The Gemara in Sanhedrin records a dispute as to the reason behind this invalidation. Rami Bar Chama says the reason is because it is similar to stealing being that the loser never fully agreed to give him the money being that he was planning on winning. The fact that he said he would give the money if he loses is a mere Asmachta, which is a not legally binding promise of words, being that he did not intend to truly relinquish his money but rather to use it to win. [Nonetheless, even according to this opinion the winner is not considered a Biblical Gazlan/robber, being that he did not forcefully take the money from the loser. He is however considered a Rabbinical Gazlan. Rashi on Mishneh R.H. ibid; Machatzis Hashekel on M”A 422/8] Rav Sheishes however rules that the money is not considered stolen at all, being that it was not given as an Asmechta but as an actual acquisition to the winner. Nevertheless he is invalidated as a witness being that he is not involved in settling the world. The practical ramification between these opinions is regarding a gambler who has an occupation, in which case according to Rami Bar Chama he is still invalid, while according to Rav Sheshes he is valid. [Sanhedrin ibid] Practically we rule like Rav Sheshes [Michaber 34/16; 370/3; Smeh 370/3; Machatzis Hashekel ibid; Rif; Rosh on Sanhedrin ibid] Nonetheless, even according to Rav Sheishes it is disputed as to whether there is a Rabbinical stealing prohibition involved in gambling, with some ruling that it contains an actual Rabbinical prohibition due to Avak Gezel and others ruling that there is no Rabbinical prohibition involved. Admur and other Achronim novelize that according to all opinions there is some level of stealing involved in gabling and the dispute is only as to what level. The following is a summary of the opinions: 1) Actual Rabbinical Gezeila. [Rami Bar Chama] 2) Not actual Rabbinical Gzeila but Rabbinically prohibited due to Avak Gezel [Rav Sheshes as rules Michaber ibid] 3) No stealing at all even Rabbinically, although it is slightly forbidden. [Rav Sheshes as rules Admur and M”A in their understanding of Rama] 4) No stealing at all on any level. [Simple understanding of Rama ibid]
 First opinion in Admur ibid; Michaber Orach Chaim 322/6; Choshen Mishpat 34/16 [laws of testimony]; 370/2 [laws of stealing]; Rambam Gzeila 6/10; Rashi Rosh Hashanah 22a; Regarding opinion of Rambam: See Hilchos Gzeila 6; Eidus 10/4; Kesef Mishneh ibid
 The reason: This is considered Rabbinical Gzeila. [Michaber 370/2] Although the money is taken with the agreement of the loser, nonetheless since the money was taken from his friend in a way of jest and fun without him gaining anything in return, it is therefore Rabbinically forbidden. [Admur ibid; Perisha 34, brought in Smeh C.M. 40] This is considered “Avak Gezel” [Machatzis Hashekel on M”A 322/8]
 Rama Choshen Mishpat 207/13 [laws of Asmachta] and 370/3 [regarding laws of stealing] “The custom is to gamble”; Tur Choshen Mishpat 34, 207, 370, brought in M”A 322/8; Rosh Sanhedrin 3/7; Tosafus Sanhedrin 25a
 Admur ibid in parentheses; M”A 322/8 “a slight prohibition”; Teshuvos Harivash 432; Machatzis Hashekel on M”A ibid; P”M 322 A”A 8; Rav Poalim Y.D. 2/30
Background: Admur ibid in parentheses that even according to the lenient opinion which rules it does not involve the stealing prohibition, it is nevertheless forbidden to do so; So also rules M”A 322/8 [see Machatzis Hashekel on ibid] that possibly one can learn this way from Michaber 322/6 that although there may not be a stealing prohibition involved there is still “a slight prohibition”; The P”M 322 A”A 8 interprets this to mean a Rabbinical “Avak Gezel”, and so writes Machatzis Hashekel on M”A ibid; However from Admur one can possibly learn that according to the lenient opinion there is no prohibition of even Avak Gezel, and the prohibition is simply due to “Yishuvo Shel Olam” as he writes regarding gambling with a gentile. Another reason for this prohibition can be learned from the Teshuvos Harivash ibid which writes “Even according to Rav Sheishes who states there is no stealing prohibition involved in gambling, nevertheless this is a repulsive, revolting and immoral act. It has caused the lives of many people to be destroyed.” Thus in total we have three possible reasons for why there is a prohibition to gamble even according to the Rama 1) Avak Gezel 2) Yishuvo Shel Olam 3) putrid act.
Opinion of Rama: The Rama in 207/13 and 370/3 writes that the custom is to gamble. This implies that there is no prohibition involved at all, unlike Admur and the Poskim ibid. However see Rav Poalim ibid that even according to the Rama there is a prohibition involved.
 Smeh 34/40
 See Michaber Choshen Mishpat 34/16 that in such a case he is invalidated as a witness; See Smeh ibid
 Admur ibid; Michaber 370/3; Rambam Gzeila 6/11
Opinion of Rama: The Rama 370/3 writes that the custom is to gamble with gentiles. This implies that there is no prohibition involved at all, unlike Admur and the Poskim ibid. However see Rav Poalim ibid that even according to the Rama there is a prohibition involved, and it is just that we are not accustomed to invalidate such a player for testimony.
 Admur ibid
 Admur ibid; Rama 207/13; Shabbos 31a
 The reason: As the mere words of promise towards charity is considered as if it was given [Amira Lagavoa Kemissirah Lehedyot]. [ibid]
 Michaber 34/16; Mishneh Rosh Hashanah 22a; Mishneh Sanhedrin 24b
 Michaber ibid; Sanhedrin ibid as rules Rav Sheishes
The reason: It is not enough to invalidate the person if he simply gambles for a hobby, as in such a case he is only performing Avak Gezel which is only Rabbinically forbidden, and the Sages did not invalidate him in such a case. If however he also benefits from the proceeds and uses it to support himself then the Sages invalidated him as a witness due to worry that he may not be a reliable witness and may lie in his testimony. It is disputed amongst the Rishonim as to the reason why we suspect the person will come to lie if he does not have an occupation. Some rule [Rambam] the reason is because he lives off the stolen money, and hence becomes an untrustworthy person. Others [Rashi/Tur] rule the reason is because he does not understand the worth of money and the stress involved in earning a living and hence does not take lying under testimony as a serious offense. The practical ramification of this dispute of reasoning is found in the following two cases. [Smeh 34/40; 370/3]
 Smeh ibid; Michaber ibid and Rambam rule that he is valid; Rashi and Tur rule that he is invalid
The reason: According to the Rambam/Michaber he is valid being that he does not live off the stolen money, however according to Rashi and the Tur he is invalid being he does not know the worth of money and the stress involved in earning a living. [Smeh ibid]
 Smeh ibid; Michaber ibid and Rambam rule that he is invalid; Rashi and Tur rule that he is valid
The reason: According to the Rambam/Michaber he is invalid being that he does partially live off the stolen money, however according to Rashi and the Tur he is valid being he does know the worth of money and the stress involved in earning a living. [Smeh ibid]
 Rav Poalim Y.D. 2/30; Chavos Yair 61; Mishpitei Hatorah 1/28;Yaskil Avdi 8/5; Techumin 5/302-310
Other opinions: Some Poskim rule it is forbidden to purchase lottery tickets according to the opinion of the Rambam and Michaber. [Yabia Omer 7/106] The students of Harav Ovadia testify that practically, in his later years he retracted from his ruling and permitted for one to purchase lottery tickets.
 The reason: a) As the company that holds the money it received from all the ticket buyers is truly interested in giving it to the winner [unlike when one is paying versus another in which case he owns the money until he loses]. B) As the tickets have a market value and one hence purchased an actual item with the money, and is not like stealing at all. [Rav Poalim ibid]