It's quite easy. Avoid downloading any kind of cracked applications, they might be posted by a trusted uploader, but you can't know for sure that he posted it, as his account on that site might be compromised. Change your security question and the password of the mail every few weeks. Don't visit suspicious porn sites, and most important, never register on random sites because you don't know these things:
1. They might be saving passwords in plain text.
2. They might be selling emails of their users to spammers.
3. They might be using regular MD5 encryption, which isn't salted, and thus it can be easily decrypted if password isn't strong.
That's all I guess..