The short answer is “stop opening the crap”.
You are inviting it in. Never open an attachment that you are not absolutely certain as to what it is. That means no cute crap that your relatives and friends send you. Never open it... period. Eventually they will quite sending it (usually because their computers have been killed by all of their crap).
Install Zone Alarm Free (or similar firewall) and Grisoft Free AVG (or other antivirus). Semi periodically run one or two freeware adware programs like Ad Aware and SpyBot.
But back to the short answer. If you don’t want crap on your computer, don’t invite it in. There ya go.
You get it anymore mostly from the sites you visit. They’ve gotten much better at it.
The default for older versions of Outlook and Outlook Express was to have the preview pane active by default. By simply clicking on the message in order to delete it, you've already launched the embedded code and infected your computer. Other mail clients, like Thunderbird are safer. Or the latest, patched versions of Outlook and Outlook Express, configured WITH THE PREVIEW PANE SHUT OFF is relatively safe. Also, be sure that your anti-virus scans incoming (and outgoing) mail.
Mark
Your advise is very good and simple. Try as much as I can, I still can’t get my sister to stop forwarding all the cutsey images and videos she gets from her friends. I tell her that’s the way spyware and viruses get spread, she just doesn’t pay any attention to what I say. When I told her that I routinely delete her email without opening it she becomes offended. I’d hate to see how much crap is on her computer.