Paragraph (1)(a): the provincial government
A provincial government, alone or jointly with another province, may conduct and manage a lottery scheme in that province, so long as it acts under a law of the provincial legislature. This is the paragraph that online casinos in Ontario, Alberta and every government platform depend on. The Code leaves the form of the scheme to provincial law.
Paragraphs (1)(b) to (g): other schemes
Paragraphs (b) to (d) allow charities and religious groups, fair or exhibition boards and operators at public places of amusement to run schemes under a provincial licence. For places of amusement the prizes are capped at $500 each and the stake at $2. Paragraphs (e) to (g) cover provinces selling each other's tickets, a scheme authorized in one province being run in another with the first province's consent, and acts needed to run or take part in a lawful scheme.
Subsection (2): conditions on licences
A province may attach terms and conditions to the licences in paragraphs (b), (c), (d) and (f).
Criminal Code section 207 offences
Doing anything for a lottery scheme that section 207 does not authorize is an offence. Conducting or managing such a scheme is indictable, with up to two years, or a summary offence, and taking part is a summary offence.
Subsection (4): what counts as a lottery scheme
A lottery scheme is defined by reference to the activities in section 206(1)(a) to (g), and three-card monte, punch boards, coin tables and horse-race betting are left out. Paragraph (4)(c) also removes games run on a computer, video device, slot machine or dice game, but only for paragraphs (1)(b) to (f). The text does not apply that removal to paragraph (1)(a), the provincial route. Subsection (4.1) allows computers for ticket sales and draws in a licensed charitable raffle, including a 50/50 draw.
The neighbouring sections
Section 201 makes keeping a common gaming or betting house an offence and section 202 lists betting offences, including advertising an invitation to bet. Section 206(7) extends the lottery offences to foreign lotteries. The wider question of who may run an online casino is on the page about legality in Canada.