Underground poker is poker played in a venue that is not operating in accordance with the gaming laws of its jurisdiction.
What exactly constitutes "underground" poker depends on the laws of the locality in question. In many (but not all) jurisdictions, an unlicensed poker game may nevertheless be legal so long as the game is played in a dwelling house, the host is not profiting from hosting the game and/or the entry fees do not exceed a certain threshold. Even if a game itself is unlawful, in some jurisdictions it is not illegal to merely play in such a game - in such cases only the organizers and/or hosts of such games are liable for civil and/or criminal penalties. The intensity of law enforcement targeting underground poker also varies depending on the locality. Often, players and hosts of underground poker games are far more concerned with being targeted for armed robbery and other violent criminal acts as opposed to being targeted with legal action.
An underground poker room will usually generate revenue for the profit of the host(s) and/or to pay for operating expenses by collecting rake and/or other house fees while not being a licensed gaming operator. Underground poker venues can also generate revenue by selling food and beverages (with or without the appropriate licences) and/or by offering side games with a built-in house edge such as blackjack or craps in addition to (or as an alternative to) collecting rake and/or house fees, but this is less common.
Under the Criminal Code, any game of poker that is not specifically licensed by the relevant provincial or territorial gaming regulator is covered by either Section 201 or Section 204 of the Code. Section 201(1) makes it an indictable offence for to "(keep) a common gaming house or common betting house" with a maximum penalty of two years' imprisonment, while Section 201(2) makes it a summary offence to be "found, without lawful excuse, in a common gaming house or common betting house" with a maximum penalty of six months' imprisonment and/or a $5,000 fine. On the other hand, Section 204(1)(b) provides that "a private bet between individuals not engaged in any way in the business of betting" is exempt from the provisions of Section 201, and thus is not unlawful. This has been consistently interpreted to mean that a poker game taking place in a dwelling house is legal in Canada, so long as the host is not taking "rake" or otherwise directly profiting from hosting the game. Whether a poker game played on a similar "not for profit" basis somewhere other than a dwelling house (for example, in the warehouse of a small business) also enjoys the exemption of Section 204(1)(b) is disputed.