For a while, the optical drive in our iMac didn't want to eject discs occasionally, which we coped with by inserting a couple of thin plastic cards while hitting the eject button. The drive eventually progressed to not reading discs at all.
The repair was straightforward. I had replaced the hard dr . . .