There could be a number of reasons why this happens with your computer. In most cases, there is a faulty hardware device or a bad driver installation. As you stated the problem, it seems that the computer restarts in the first steps of booting. This is something familiar when a hardware device doesn't work properly and the reason could be your motherboard, RAM or improper settings in the BIOS menu. Try and replace your hardware and see if it acts the same. In case of a wrong BIOS configuration, restart your computer and rapidly pres DELETE button. In the menu that appears select Load FailSafe Defaults and restart your computer. If this was the cause to your problem and the computer works after this operation, then everything should be all right.