The first thing to do is ruling out hardware errors. Test your RAM with
http://www.memtest.org/#downisoMemtest86+ test your harddisk with the manufacturer's diagnosis tool. Does this happen more often if the machine is under heavy load, if so check the temperatures and consider a faulty PSU. The symptoms you describe usually point to a problem with the hardware.
If those things are ruled out then it seems to be a software error. Does this happen after a fresh and clean installation? Does this happen if you have a specific application running? Is the error reproducible?
If you found out which specific software is giving you the issues I would go to the website of that software's developer and look at the bug-reports to see if your issue is already reported (and maybe fixed in a newer version), if not report the bug yourself.