I agree with arun..
1) if your system shuts down with a messege like remote shutdown within xx seconds ..etc you surely have a virus.. Restart in safe mode and do a virus scan
2) Sometimes, the system shutdowns when you have overheating problems. Check weather your system well cooled.
3) Hardware failure/ mismatch can call the BSOD. if so, uninstall the newly added hardware and check again..
4)If your system shutdowns with beeping sounds, check the ram, try removing and placing it in another slot.
5) Sometimes the procrssor may also have been misplaced. Remove and replace the same again.
6) you may have configured your system to shutdown when a kernel error occurs.. if so boot with a removable media and repair/ reinstall windows..
And most of all when you face a problem, try to state the problem clearly as possible. We cant analyse withiout any clue. Your question isnt with proper details . please add the same ..
Hope this helps