|Open the case. Is there any dust buildup, especially near the CPU fan? If so, clean it out with a can of compressed air. Don't use a vacuum because it can cause static electricity buildup that could damage your motherboard and any devices. There may be dust causing the CPU to overheat and shut itself down to prevent overheating, either that or a fan is not operating like it should. There are also other possibilities, such as the power supply not supplying the right current and thus the motherboard is shutting itself down to prevent problems.|
What's the brand and wattage of your power supply?
CompTIA A+ Certified