These are the symptoms of a system with heat and/or power issues. Could be a defective power supply or an overheating CPU or GPU.
Check for the cleanliness of the inside of your system. Also, you could pull the CPU fan and then clean the fan and CPU surfaces and apply new thermal compound. Verify that all fans are indeed working, as well.
Last, you may want to swap your PSU (power supply) to make sure it isn't kaput. PSUs can and do wear out.