It could be PSU, motherboard or other. Here's a well done video on troubleshooting the dead desktop PC.
i have an hp pavilion g7-1139wm it started to shut down when i watched videos then it would just shut down randomly.well i bought a new hard drive about a week later it died on me. when i try to turn it on the lights turn on for about 2 minutes then shut off it never turns on just the lights do what could be the issue

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic