It usually happens when there's a driver fault or a memory fault. Windows is, by default, set to shutdown if it encounters a 'serious' problem. You can change that behaviour by going into the System Properties, on Vista, right-click Computer, choose Properties > Advanced tab > Startup and Recovery section > Settings button > System Failure section and untick the 'Automatically Restart' option click OK, Apply and OK to exit. Now if your computer encounters the problem again, rather than shutting down, it will give you an error message. That message might be helpful to us in diagnosing your problem.