try this it might work.
---------
on xp
right click on 'my computer' then click 'properties' then on 'advanced' then on 'settings' under 'startup and recovery' and un-check the 'automatically restart' under 'system failure'
---------
on Vista
right click on 'computer' then click 'properties' then on 'advanced system settings' then on 'startup and recovery' and un-check the automatically restart under 'system failure'.
----------
also check out your event viewer and see if there is any errors
right click on 'my computer' then click 'manage'
on the left under 'system tools' is 'event viewer'
-------------
also it can be that u'r power supply is going bad. try to unplug some of the devices(like dvd-rom, cd-rom) from the power supply.
what kind graphic card do you have?