More likely a firmware issue. Usually that's caused by the computer incorrectly telling the CD-ROM to eject the CD. Check for any updates, or just reinstall the drivers...
What DCISCOUTS said SHOULD fix the problem. However, if it doesnt, before returning it, I would reinstall XP and update my BIOS just to make sure an OS corruption isnt causing the problem (unlikely, but it doesnt hurt to check).
Yeah, There was a virus a while back that asked you to 'Click Here To Download Free Cup Holder' and when you clicked it, it would eject your optical drive, giving you a cup holder
i had a virus do that to my 3 cd/dvd drives.. it was annoying. scan for virus, reinstall drivers, look for updates or just google the problem . good luck
Two or three years ago my daughter got something on her computer, it would start making a telephone dial tone, the cd tray would pop out and in about 5 times then a weird face would show up on the display then it would just shutdown. I fooled with it for about 30 minutes while laughing my ass off! She didnt have much on it so I just reinstalled. Never did find out what it was but that one was funny!