Are you facing the problem of PC turning off automatically after few seconds (approximately 10-20 seconds) of PC turned on? When you search at websites, you can find various reasons for the cause of this problem. Those reasons may be correct at their place. One more reason for this cause could be a virus. In the initial this problem sounds like your OS is corrupted but the fact is through some media, a virus has been placed in your PC to run at Startup. So, when your turn on your PC, it will automatically shut down after few seconds only.
The solution to this problem is when you turn on your PC, make sure to open 'task manager' by right clicking on taskbar (or more efficiently with the help of shortcut key' ctrl+shift+esc') and then click on 'Startup' tab. After that disable the program with filename something like '1r...' (or something you feel like suspicious) and having white blank icon (probably it would be located on the top of the list). This whole process should be completed within given 10-20 seconds only. When you are done with doing this, your PC might turn off once more but don't worry if you have managed to disable the virus, it won't happen again. Finally, go to task manager again, then click on startup tab and right click on that virus program which you just disabled and open its location and delete it. Also clean your temporary files.
This might help you, if not there could be other problem with your PC.