1) Using high quality pc components.
2) Update all the drivers regularly, also the BIOS when you add the new hardware.
3) Using antivirus software
4) Clean up the PC by the utility software like CCleaner http://download.cnet.com/CCleaner/
5) when you are online , just be smart, even you have the antivirus software.