Computer shuts down by itself and turns on by itself

so few weeks back.. my computer randomly shut down and it kept restarting and within like 5 seconds of it restarting... it would shut down again and it would keep doing that. eventually it would load up and after like 3 min it would shut down.

so recently i had to use my comp a lot for school work... and it keeps shutting down a lot... sometimes its on for a long time and itl shut down or sometimes it takes like 4 min. Ive had it off one time and it just randomly turned on for no reason. Turned it off once before bed and it turned on while i was in bed. Sometimes itd be on when i wake up in the morning.

The comp is windows vista, Dell

Someone help :/ cant even do my papers...

also quite recently, ive had 3 blue screens, took it to best buy and they said it might be something with the driver/ram... but idk. just today it said i needed a driver update but when i tried to update... it said that the software could not be found. but idk if thats whats causing the problem.
 
If this is a laptop, remove the battery and use only the AC adapter. See if this fixes the problem. If this is a desktop replace the power supply first...
 
Back