The lottery (called lotto in Camden) is a popular form of gambling which involves the drawing of lots for a prize.
In My Name is Earl, Earl gets a scratch card worth $100,000 in the Pilot. However, he is immediately run down by a car afterwards and the card blows away. Whilst recovering in hospital, Earl seens an edition of "Last Call with Carson Daly", in which Daly talks about the concept of karma. Moved by Daly's words "do good things, good things happen to you", Earl redirects his life to the form of karma, and begins to make up for all the bad things he did. Soon after, the winning scratch card flew back to Earl, and he realised that karma really did work ("Pilot").
Earl then used the money he won on the lottery to complete more items on a List that he creates that has all the bad things he has ever done on it. However, after crossing several items off his list Earl realized that he had to give up all of his lottery winnings to Paul, a man he stole ten dollars from, which he used to buy the scratch card. After Paul was granted bad luck with the money, he gave it back to Earl ("Number One").
In Randy's List Item, Randy got a lottery ticket from him and Earl's aunt. Even though Randy only won $250 he was excited like Earl when he won his ticket. He also immediatey lost the ticket after being hit by a bike. But in the end of the episode Randy got his ticket back it's unknown what he spent with the money ("Randy's List Item").