Some things to do
If you know the error code post it here..it will help identify the problem area/s
Open pc case and check that all fans are running and that the heatsinks/case ventilation hole are not clogged up with dust.
Remove and reseat the RAM memory and pci cards and check that all cable connections are firmly fitted to motherboard/hard drive/cd rom drive etc.
Scan for Spyware/Adware with the likes of A2,Adaware,SpybotS&D and Coolweb Shredder in addition to your virus scanner.
Now see if you still get the crashes and post back.