im guessing you have windows xp, if so try this:
install all updates listed as critical, security related or service pack from click here
try also clicking 'start/control panel/system/advanced/start up and recovery/settings' and untick 'automatically restart' you should now no longer get a restart but instead get a useful error displayed instead. note it down exactly and look it up in the 'search(KB) box click here or post it here.
update your drivers for motherboard, graphics card and soundcard also from the manufacturers websites.
look in 'control panel/administrative tools/event viewer' under the 'system' and 'application' tabs for any errors listed that have the date and time of any crashes or hangs you have had and click the links for more info maybe.