An optical drive that reads both CD and DVD media uses different lenses for
these functions. If it reads one type and not the other, then one of the
lasers has failed or it's lens is covered in dust/debris. First try using a
cheap lens cleaner disk, these are available at most stores that sell this
type of media. If it fails to correct the problem, then you likely have a
failed drive that needs to be replaced.