If you have a valid Windows CD in the drive, and it's booting to CD first, there should not be error messages about your operating system; it should be taking you to the install process.
The only reason I can think of that could cause this is if the computer is not reading from the CD, though it still has power. This is most commonly caused by a loose IDE cable connection from the CD-ROM to the motherboard. Power down the system and check the IDE cables.
While you're at it, re-plug the IDE cable for the hard drive into both sides. My sister has an eMachine and sometimes she accidentally knocks that cheap cable loose. Re-plugging the cable fixes this problem.
So, in summary:
1. Unplug and plug in the IDE cables for the hard drive and try to boot from it.
2. If that fails, do the same for the CD-ROM IDE cables and try to boot from it.