Do you see the Windows logo before it switches off automatically? Does the desktop/icons/start menu appear on the screen?
Try to start the system in Safe Mode: press F8 during startup (just keep tapping it repeatedly), and select Safe Mode. See if it still switches off. If not, then run an antivirus scan while in SafeMode.