According to the apple.com help site, for a CD drive that won’t accept a disk:
1. Be sure to check your disc to make sure it is flat. You can check this by putting the disc upside-down on a flat surface. If the disc is bowed up on any side or in the center, do not use the disc as it may get stuck in the drive.
2. Make sure you are inserting the disc far enough for the drive mechanism to activate. Discs must be inserted at least three-quarters of the way into the drive, and often nearly all the way in, before the drive will pull them in.
3. Make sure the disc is completely inserted in the drive. The disc-insert cycle runs the motor for about 6 seconds. If, for whatever reason, a disc is not completely inserted, the drive will reverse and push the disc back out of the drive.
4. Since the entry slot can be tight at first, give the drive 1 or 2 seconds to accept the disc and pull it in on its own. If the drive struggles with injecting discs or injects them part-way then stops, inserting a disc multiple times should correct the issue.
5. Reset the Power Manager (PMU) or System Management Controller (SMC).
6. Do not use discs that have anything attached to them or dangling from them (such as “sweeper” or cleaning discs).
7. If the drive repeatedly does not insert media fully, or accept media at all, please contact Apple, contact an Apple-Authorized Service Provider, or make an appointment with an Apple Retail Store for additional troubleshooting, evaluation, or service.