Before resorting to more extreme measures, you should wash the CD. This is because marks that appear to be scratches may simply be surface blemishes that are interfering with the CD's playability. Fill a bowl with warm water and add a few drops of mild dish soap. Rub the solution onto the CD with your hands. Rinse it with warm water.
If desired, follow up by dribbling a few drops of rubbing alcohol onto the underside of the CD, then wiping it dry with a soft lens-cleaning cloth. To dry the disc, start in the center, then wipe the cloth in a straight path toward the outside edge of the CD.
If cleaning the CD doesn't do the trick, you'll have to try to buff down and fill in the scratch. The mildest way to do this is to use toothpaste. Apply a very basic white toothpaste to the underside of the CD; do not use a gel-style toothpaste, as it is too gummy to work properly. Use your finger to evenly distribute the paste in a thin layer on the CD, from the center out. Allow the toothpaste to dry, then rinse it from the CD under warm running water. Dry the disc with a lens-cleaning cloth.
Deep scratches generally require a more abrasive cleaning method than milder ones. To treat deep scratches, apply a plastic or metal polish (such as Brasso) to the underside of the CD. Spread the polish over the surface of the CD with a soft cleaning cloth, working from the center of the CD out. Wipe the disc clean with a cloth, then wash it with warm water and dry it thoroughly.
The goal when using a polish is to remove the scratches, but doing so may create smaller scratches on the surface of the CD. After applying a harsh polish to the disc, you may want to wax the disc to smooth out the surface. Apply a thin layer of car wax to the underside of the clean, dry CD with a cotton swab, and allow it to dry completely before attempting to play the disc.
Repairing a scratched CD is generally a temporary solution, so it's best to transfer the data from the disc as soon as possible. After each attempt to fix the CD, test it in a computer. Sometimes computer disc drives can read damaged CDs better than personal CD players. If the computer can pull up the music tracks or data, burn it onto another disc. It's best to create a new or backup CD when you're having trouble with the original.