Optical drives wear out and/or break.
It's possibly time to replace that drive with a new one.
How easy that is going to be depends on the model of your Mac, something you didn't share with us.
Why not consider an External CD/DVD device? Take a look at Macsales.com they have a good selection of external optical devices that are much faster than your existing one, even when it worked.
I am a find artist and I have used my MAC OS X 10.5.8 (Leopard) to drag-drop/burn onto DVD and CD for many years with no problems. Suddenly now, my disk drive doesn't show up when I insert a recoradable DVD. I tried many disks. When i insert a blank disk, an application pops up (MS Powerpoint). I changed system preferences to "disk utility" and what i get is some interface that doesn't let me drag and drop my image files onto the disk either. When i close the application, I cannot find the icon for the DVD/CD disk drive. It doesn't show up in Finder or on the desktop. Suggestions please? Thank you.