Once you contact the "organizers" of the lottery with your special code, they'll tell you that you have to pay a fee in order to transfer the money. Another tactic is to ask you for your bank information so they can deposit the money in your account. You get deeper and deeper into the scam as the money supposedly gets closer and closer to your ****, but can't seem to quite get there without an increasing amount of money or information from you.
Obviously, you should just ignore any message like this. If you've been fooled and have sent personal information or money to the scammers, you can assume that your information has been compromised.
Here's what a typical message looks like:

Re: Lottery Scams - How Do They Work?
by hemla on 11 Nov 2007 22:45
Replying to [Admin]:
with spam verifird how this thing still working on my mails pls you should update the measurers to stop them even coming to bulk folders
Fraud alert! beware of a new phishing email!
Author: Safe Trading Admin
free membership service to continue as planned
Author: Safe Trading Admin