Go to safe mode
Go to Start-> control panel -> administrative tools -> Event viewer
look at each subsection to see what programs are crashing on you. Report back, if you get the same error while in safemode then we can narrow down the problem to it being most likely hardware issue, instead of driver issue.

Also what is the error code number you get? If your computer is just rebooting itself then you need to set your computer to not reboot when system's crash happens

Start-> control panel -> System -> advance ->Startup and Recovery -> untick automatically restart