if your pc has issues booting, it may be because of
1. cheap hardware - include graphics card, RAM (happened to me), power supplies (happened to me), hard drives, motherboard
2. incorrectly installed hardware. take everything out, then try turning on your pc with one thing only, then keep trying while added other pieces. if it fails with nothing in (barring RAM), then it is the motherboard.
2. too much load on the power socket in the room - unplug some stuff and try again
3. when you play games, it uses a lot of power, and if your power supply is below around 400 watts (normal nowadays) it may not deliver enough to the cpu and crash and/or reboot. THIS IS PARTICULARLY DANGEROUS AS YOU COULD BLOW YOUR CPU GRAPHICS AND/OR MOTHERBOARD!
4. incompatible hardware. this is more common with RAM than anything else, but does happen to graphics cards
If it gets to windows then restarts, you may also have a virus. Take out the disk and let a friend with a virus checker plug it in their pc and run a check on it. If no virus is found, then it is a Windows registry problem, which is solved by formatting and re-installing.
Also, get a PC 4 dummies book - they are great at doing this kind of stuff...