Your computer keeps randomly turning itself off?
This problem can be pretty simple. First thing I always do in this case is unhook all the cables, remove the side cover of the tower, and blow the dust out!
Dust inside your computer, mainly on your CPU (the part with the fan in the middle or so of the motherboard) and in your power supply, can cause overheating. If your computer is starting to overheat, it will turn itself off to protect itself.
Using something to actually blow the dust out is the most effective. Compressed air, even from one of those store bought cans, will work wonders. If you don't have access to some sort of compressed air, then doing the best you can with your vacuum will work too.
If you have cleaned out your tower and it still is turning itself off, the next culprit would be a faulty power supply, or a faulty motherboard. It's probably time to call a professional at this point.
Good luck!