well surely if it's turning off and sometimes not even turning on again it's a power supply issue. Especially if it is a pre-built computer like a dell since they always use the cheapest power supplies they can which is a bad idea because when a power supply finally goes it can fry everything else with it.

Might not be but sounds like it could be.

Only other obvious thing is to make sure all the cables in the case are connected properly so there's nothing loose.