Where to start - who knows!
Could be some process that continues to use the CD even after it seems to be closed...
Try the sytem file checker
scannow sfc - LEARN how to use SFC.EXE (system file checker) in this article!
If you are on XP, there is an option to tell the PC not to restart when there is an error:
Troubleshooting Windows XP Shutdown Issues
"Startup and Recovery Options: By default, XP is configured that when a system failure is encountered the system automatically restarts. This behavior may at times be desirable, especially if a system is unattended and and a reboot is necessary to restore a system to operation. Unfortunately, it also makes it very difficult if not impossible for a user to read the messages that are presented that may provide clues to a shutdown problem. To prevent the system from automatically restarting:
Right click [My Computer] click [Properties] and select [Advanced] tab.
Click the [Settings] button in the [Startup and Recovery] section.
Remove the checkmark from [Automatically Restart] in [System Failure] section.
Pay particular attention to these messages as they may provide valuable clues to shutdown issues."