I had a nasty bout with spyware a few months ago. Do a google search for and download Spybot and Spywareblaster. CW shredder is another good anti-spyware to run. The Mozilla Firefox browser has far fewer security holes than Internet Explorer, and is less vulnerable to spyware. The best news is that all these programs are free.
Like Toirtis said, you should have a firewall to protect your system from hacks. I use a software-based firewall from McAffee that came with my broadband connection. You should check with your ISP and see what they have available. The most secure type of firewall is built into some network routers - they tend to be expensive, though.
Regardless of what protection you have, you should never open unknown e-mail attachments. Whenever a popup window opens, click on the X to close it. Never click 'OK', or even "cancel'. Doing so can cause spyware to be installed on your system.