Gambling and betting
When engaging in business, you certainly do expend a definite cost with the chance of profit or loss.
However, the Quran says this is permissible (Quran 2:275). This verse permits trade and prohibits usury, Riba. "Trade" encompasses entrepreneurship (e.g. sukuk, mudarabah, musharakah, etc.). Therefore, this cannot be the definition of gambling in Islam.
The difference between gambling and business is "gharar". Gharar roughly translates to "excessive risk" in the context of Islamic financial jurisprudence. The doctrine states that when engaging in financial transactions, you cannot take "unreasonable" risks, and you must mitigate the risks. What constitutes "gharar" is evaluated on a case-by-case basis, but hadith and Sunnah have given us a powerful guide.
When Gharar is too high, the transaction is seen as gambling. In general, gambling is defined Islamically as a financial transaction wherein the individual puts forth a definite cost, has the ability to gain or lose profit, and has virtually no control over the outcome, i.e. the gharar is too high. An example from hadith is taking a coin, and throwing it at a set of clay pots. Landing in certain pots will give you a prize, others will not, and none of the pots are marked. This is gambling in Islam. Another is if you pay me a sum of money for an unknown good, and I only reveal the good after you pay me.
Interestingly, some versions of "gambling" are actually allowed in Islam. For example, the Prophet (peace be upon him) allowed archery contests, horse races, and camel races, and the competitors were allowed to place wagers with other competitors, though outside persons were not allowed to place wagers.
This likely means that wagers in contests of skill, strength, and knowledge (where people have some control over the outcome) are permissible in Islam, but only to the competitors (because only they have control over the outcome).
Regarding the well-known games (e.g. lotteries, roulette, dice roll) are not considered by Islam as simple games or easy pastimes.
The Quran often condemns gambling and alcohol together in the same verse, recognizing both as a social disease which is addictive and destroys personal and family lives.
Satan's plan is (but) to excite enmity and hatred between you, with intoxicants and gambling, and hinder you from the remembrance of Allah, and from prayer: will ye not then abstain? (Quran 5:91)
Similar thought in 2:219.
Gambling is a bad habit that has serious consequences with regard to family and personal life.
The general teaching in Islam is that all money is to be earned through one’s own honest labor and thoughtful effort or knowledge. One cannot rely upon “luck” or chance to gain things that one doesn’t deserve to earn. Gambling is when you're betting on something you virtually have no control over the outcome. Such schemes only benefit a minority of people, while luring the unsuspecting— often those who can least afford it—to spend great amounts of money on the slim chance of winning more. The practice is deceptive and unlawful in Islam.
In the early stages of Islam, betting was not yet banned. Related to this is the story of Abu Bakr. The 30th Surah foretold the victory of the Byzantines over the Persians in a hopeless situation, as the first time the Persians scored a devastating victory over Byzant. It was then that revelation was born, which predicted in Bid’i Sinin, i.e. within ten years the victory of Byzantines over the Persians.
The British historian Gibbon says, even seven to eight years after this prediction of the Quran, the conditions were such that no one could even imagine that the Byzantine Empire would ever gain an upper hand over Persia. Not to speak of gaining domination, no one could hope that the Empire, under the circumstances, would even survive. bid`i sinin, and the word bid` in Arabic applies to a number up to ten. Therefore, make the bet for ten years and increase the number of camels to a hundred." So, Abu Bakr spoke to Ubayy again and bet a hundred camels for ten years. Eventually the word of the Quran came true and Byzant won.After this no one could have any doubt about the truth of the prophecy of the Quran, with the result that most of the Arab polytheists accepted Islam. The heirs of Ubayy bin Khalaf lost their bet and had to give a hundred camels to Abu Bakr Siddiq. He took them before the Holy Prophet, who ordered that they be given away in charity, because the bet had been made at a time when gambling had not yet been forbidden by the Shariah; now it was forbidden. Therefore, the bet was allowed to be accepted from the belligerent disbelievers, but instruction given that it should be given away in charity and should not be brought in personal use.
As a consequence, money obtained by betting, which is illegal in Islam, remains haram, and the only possible halal thing to do with it is to give it to charity.