First check whether you installed an new hardware and driver are properly loaded. Then check any exclamatory marks are in device manager properties. If every things is correct and till you are facing the problem. try step2
Step2
If you installed any new software which is not recognised by microsoft( for example demo softwares from free CDs which is availabe with magazines). Check it out and uninstall. Usualy some sofwares wont uninstall. go to safe mode and uninstall( sometimes it will work)
Step3
Still you are facing the same problem. Just Click start and then select accesories and system tools and then system information click it.
In system information select software environment and expand it. There will be an branch in the name windows error reporting select it.you will see a information " Refreshing system information" then you can able to see system error report. if you can understand the error log report you can fix it.
Step4
still you are not able to fix it then reinstall it.
Step5
again the computer is rebooting. Then you have to check the ram some times faulty ram can reboot the system.
Tips & Warnings
Computer Hardware Trouble shooting
Please take back up of your data before trouble shoot any thing. because some thing will happen in electronics.