If you're not afraid to pop open your box, do it now.
There is a flat ribbon cable called an IDE cable that connects your CD drive to your motherboard. First things first, check and make sure it didn't become unseated. If it's loose, push it back in and that should fix it. Reboot it to test.
If it seems pretty snug, then it has possibly gone bad. Parts age and failed IDE cables aren't terribly rare on older PCs, although they are uncommon. Happened to me once. Pull it out (gently) from the motherboard and the CD drive, and then get ye to yon Fry's or Best Buy and buy a new one. (Ask for assistance if you're not sure which one to get.) It shouldn't be much more than $10 or so.
(Alternately, if you have a friend with a PC, you can test the cable on their box by replacing their exising CD ROM ribbon cable with your possibly bad one. If their PC doesn't detect the CD drive after that, it's definitely the cable.)
Pop in the new cable and reboot. If it detects your drive, you can toss the old dead cable away. If it STILL doesn't detect your drive, then there may be a problem either with the motherboard or the drive itself.
To test the drive, find that buddy with a PC and try running the drive on that box. If it runs right, then the problem is likely with your motherboard; I think CD ROMs run into the southbridge, IIRC, and one of the connectors or capacitors in that area may have gone bad. New motherboards aren't too pricey these days, but at that point you might as well just get a new box.