Ok it could either be a software problem or a hardware problem. Let's tackle it from the software end first.
Spybot search & distroy
Get these and update them often. Ad/spy protection tools are useless unless you keep them up to date.
Now as for antivirus software, there are many to choose from and the top dogs have many loyal followers. Speaking for myself I have a perferance for McAfee. It does the job very well, as do other brands. This one has a small memory footprint and seems not to interfere with normal operations.
Bottom line is just get a antivirus program running. Not having one is just asking to get raped every time you go online.
As for now if you don't have one the trendmicro site has a good online scanner. It doesn't fix it just confirms if you have a virus. Stinger is a good trouble shooter for those hard to clean pests.
Ok having said that, let's look at the hardware.
A PSU that has a failing power rail can cause lockups. A hiccup on the 5 volt or the 3.3 volt rail can lead to freezes. These 2 power rails provide power to the RAM, PCI, Hard and optical drive electronics, and chips on the motherboard.
There is not a really reliable way to test a PSU other than replacing it with a known good unit.
Failing ram is another source of lockups. Memtest86 is a good test program to find a bad or failing ram card. Takes a while to run it but time well invested.
Well kid, that's my 2.5 cents worth. Inflation you know...