Does this happen for every CD, or just specific ones? Do audio CDs cause the
same problem? If not, then it could be a program autoruning that crashes
windows and causes it to reboot. Try holding shift while you put the CD in.
If it happens for all CDs, it could be caused by a bad or underpowered power
supply. I've had this happen in several systems where the power supply couldn't
cope with the added load of spinning up a CD.