Having problem with CDRW device

Hello. I’m experiencing a problem with my CD RW device. It doesn’t want to close - I push the button and it simply goes out. It can’t hold any CD in it no matter if there is one or it doens’t. Could you give me a piece of adive?
I guess this is a hardware problem, but there must be some ways to get it fixed through software.
Thanks for the help:)