You pick numbers from a larger set of numbers
You purchase those picked numbers in the form of a ticket
If the numbers you picked are chosen during a selection process, then you win the jackpot
If someone else also picked those same numbers, then you share the jackpot with them
Let's run a test lottery. You need to pick 2 numbers from the following:
1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12
Let's say that you pick 3 and 7. You'll purchase a ticket from an approved vendor. Now I'll use some sort of random event device. This could be as simple as a BINGO drum. It'll have 12 marked items inside. 2 items will be pulled from it and the numbers are read. Let's say that 4 and 8 are chosen. You just lost and I have your money. If I pulled 3 and 7, then you would win and get the jackpot (or your share of the jackpot).
That's all there is to it.