1) Overheating- If you are playing a game and the PS3 suddenly turns off, you get the PS3 3 beeps and it flashes a red light, your PS3 has probably overheated. Leave it for about 20 minutes to cool off then place it in an open, well ventilated, space on a smooth, hard flat surface. Never use it on a carpet; they trap the heat and can block the ventilation vents. Also over time excessive heat can damage the internal components of the PS3.
2) CPU or GPU error- If you try to turn on the PS3 and it beeps 3 times and gives you a flashing red light then you may have a serious problem, the CPU or GPU may have been disconnected from the motherboard. Try the simple fix below; however if that dosen’t work, you may have to send your PS3 to Sony or see attached PS3 repair guide and fix the PS3 3 beeps yourself.
Simple Fix (PS3 Hard Reset):
A hard rest will change your PS3 settings back to the factory settings. To do this:
• Put the PS3 in standby mode
• Press and hold the power button on the console of 10 seconds until you hear 3 beeps
Thats the hardware error code. Does the light turn yellow for a second. If it does then it's a serious problem. If you what you are doing you could try fixing it yourself. If your not comfortable doing repair work then you need to get it repaired by sony or just get brand new one. Theres not much you can do.