Ive been having this problem since I built the pc, there is no pattern to it. Sometimes when I start my computer it will restart mid boot, sometimes it will just turn off, sometimes it will start and I will have no display, then I have to restart it manually, and often it will go without these problems for a weeks.
Faulty RAM? I had an issue on an old XP where after every restart I was more and more likely to experience a crash in program X. X worked fine on other computers for millions of people, it was just me having issues. RAM check indicated some rather interesting problems...
I'm with LB on this. I had a PC not too long ago that had new memory installed. The memory gave consistent problems such as those you're describing. Additionally, though, it could be a faulty motherboard.
The only way I know is to swap them with one you know works. I have a WinXP machine that is off to the side because it shuts down after being on for maybe a second or two. I need to get an extra PS to test.
Your PSU is also a good place to look, as roberts suggested. Faulty PSUs can cause some very strange things to happen, often pointing you in completely the wrong direction e.g. Display adapter doesn't get the power it needs, motherboard beeps indicating no display adapter. Swapping it with a known 'good' PSU is really the only way to eliminate it as a possible cause of the instability.
Failing that it's back to the process of elimination, strip the machine down to it's bare bones i.e. remove any non-essential hardware and boot. If the system is still unstable then you've at least narrowed it down a little. The only way forward from there is to begin swapping hardware, even the CPU if necessary. Often an awkward situation (been there many times) if you don't have any spares.
trust me that a faulty psu will not give you problems mid boot. i would ask if your c-mos battery is ok
is it is not it might cause your bios boot sequence to trip this in turn will make the system to toggle back to the start and start the boot sequence again and try to get all the essential start up programs loaded into your memory .faulty ram only brings problems with the speed of the pc it would still boot but when the bios is running diagnostics it would raise an error that's basic on all windows versions .
@ polar: A bad CMOS battery will not cause any of the issues the OP described while booting. In fact my home PC has had the battery removed for about a year now with no issues at all. All the battery does is keep the system clock ticking while the Mobo is not powered. EDIT: Also a bad PSU could cause any number of issues. Imagine if a random component on your PC suddenly has a power drop, can you honestly say you can predict what would happen? This is why they are such a PITA to diagnose and why, as stated before, you need a second PSU to verify it.
@ OP: Based on your last post I have to ask the obvious question, is the CPU fan running? This does sound like a possible heating issue amoung the other things mentioned already. Don't trust passive CPU heat sinks* even if that's what came with the processor, always have a fan running on the CPU. Also make sure you used the absolute minimum amount of thermal paste to cover the area between the heat sink and the processor the heat conduction factor is inverse of the thickness of the thermal paste. The next time it reboots jump into the BIOS and check the internal temp on the processor, then look at the data sheets of the CPU to make sure it's below spec on that model.
*EDIT: IMHO Don't trust heat pipes over passive heat sinks on modern equipment either. If you have a heat pipe over an active cooler then make sure both fans are blowing in the same direction. On that note make sure all of the fans on your tower are blowing in the same direction to, either front to back or back to front. This arrangment should be based on the enclosure that the PC case sits in, make sure there is adequite room in the direction the waste heat is being pushed so that it isn't reflecting off a surface creating an eddy.