if your computer crashes randomly, the most common reason for it is unstable power from the power supply, The second most common reason is a Windows bug, the third most common reason is overheating of a part and it could be your videocard, RAM, CPU...
Try reinstalling windows, switch with another power supply and if that does not work consider that the computer will not be fixed!