Hold the CD by its edges. Use a soft, lint-free cloth, either one made specifically for CDs or for other sensitive surfaces such as LCD screens or eyeglasses, and carefully wipe off the CD until no smudges remain.
If the cloth itself doesn't get the CD clean, use a solution of warm water and mild soap. Dip the cloth into the solution and rub the CD from the center out.
Dry the CD with a dry part of the cloth or another lint-free cloth. Do not attempt to play the CD or put it in a case until it is fully dry.
If the previous steps don't work, you can use a little rubbing alcohol or a cleaning solution specifically designed for CDs. This should really cut through heavy smudges and oily fingerprints.
If there are scratches in the CD, you may need to try a product specifically designed to smooth out scratches on most CDs. Although this product does work sometimes, it is not guaranteed to fix a scratched CD.