|computers usually shut down suddenly when there is a fatal error, have you got any viruses? I would say scan for viruses, but you can't can you? Have you got another computer? If so try using the harddrive in there and if it switches off on that it's probably a virus, or an error somewhere. If it doesn't then make sure none of the internal connections are loose.|
You can always try booting in safe mode, if it doesn't shut down then maybe a program is automatically shutting down your computer during startup. If thats the case open the start menu goto run, or a search bar, or task manager-applications-rightclick-run and type msconfig then see if there is any rogue programs there under startup.
You could take it to get repaired.
Make sure the battery is charged.