depends on which version of windows you are using, win95 was a bitch to set up cdrom drives on, you had to have an install floppy disk to get it recognised, win98 and newer was no problem (cant speak for win NT as i have never set one up) ok here goes:--
is the cd drive on the same IDE cable as the hard drive, if so you need to set the cd to slave, not master
if it is on its own cable then the master bit is ok.
in either case, check the cables are pushed firmly in and are the right way round (red cable/red striped cable, goes nearest the power connector).
if that is all ok, goto device manager and click cdrom drives, then right click the cdrom and click uninstall, reboot the pc and windows should re-find the cdrom and set it up.
if that doesnt work, goto the bios and check that the auto detect is set for the primary & secondary ide connections (secondary master) or primary slave is set to auto, if still no joy, try setting them to look for cdrom.