Open /Applications/Utilities/Console and set the preferences to automatically display crash logs. This will help you narrow down the cause of the problem. It is most likely a failure either on your hard drive or in your RAM, but it might be a software issue. Analysing the crash logs will help nail down the problem.