Keep your operating system updated, by turning on automatic updates.
If you have plugins like Flash, Java, Shockwave, or Adobe, keep them updated regularly also.
Use an Antivirus product. Currently I recommend Kaspersky. But anything is better than nothing so if you can't afford one, go out to filehippo.com and search for one of them on there.
Never open up an email if you aren't expecting one or it doesn't "sound" like the person it's from. If you see a suspicious email even from a friend or someone you know, it could still be spam. There are simple ways to send email that look like it's from someone else. Just send out a quick email to them and ask if they actually sent it and what it is.
Check out the links to my other articles to help keep you safe when installing software