The first symptom of a dirty drive is that you get read errors on a data CD or degraded sound from a music CD. If this happens, it is often because the CD itself is dirty or scratched, so try a different CD before assuming the drive is at fault. In theory, CD-ROM drives require little cleaning. They are reasonably well sealed against dust, and all recent drives incorporate a self-cleaning lens mechanism. That said, the fact is that CD-ROM drives accumulate dust and grime internally just like any other removable media drive. Caddy-load drives are less subject to this problem than tray-load drives, but all drives eventually become dirty.
For routine cleaning, simply wipe the external parts of the drive occasionally with a damp cloth. Many drive makers recommend using a drive cleaning kit every month or two, although we usually do so only when we begin getting read errors. To use these kits, which are available in wet and dry forms, simply insert the cleaning disc and access the drive to spin the cleaning disc for a few seconds. For a particularly dirty drive, you may need to repeat the cleaning process several times. Most CD-ROM drive manufacturers discourage taking more extreme measures, so if you go beyond these routine cleaning steps, you are on your own and may void your warranty.
Caddy-load drives can be cleaned more thoroughly by removing the drive from the chassis, vacuuming the interior gently (or using compressed air to blow it out), and then drenching it down with zero-residue cleaner. Tray-load drives may be more problematic because the tray on some drives blocks access to the interior whether it is open or closed. If that is not the case on your drive, you can clean it using the same procedure as for a caddy-load drive. If the tray does block access when it is open, the only alternative is to disassemble the drive, if that is possible.
Some drives use a crimped sheet metal enclosure that cannot be removed without damaging the drive. Other drives have a removable metal bottom plate, usually secured by four screws. Removing that plate may provide adequate access to the drive interior for cleaning purposes. If not, do not attempt to disassemble the drive any further. Unless your time is worth nothing an hour, it's easier and cheaper just to replace the drive.
If you experience errors reading some CD discs, the problem may be dirty discs rather than a dirty drive. We usually clean discs by spraying them lightly with Windex and gently drying them with a soft cloth. That method is frowned upon by some, but we've never damaged a disc by cleaning it that way. If you want to use an approved method, buy one of the commercial CD-ROM or CD Audio disc cleaners, which are readily available from computer and audio supply resellers.