Why can't I play my DVDs or CDs in my laptop when I used to be able to?

I don't know if it matters, but I have a 10.9.5 version. I put it in and then the device pops the CDs right out a few seconds later.
Answers

Pete L

CD/DVD drives don't last forever, maybe it needs replacing. Sometimes people try to clean the delicate lens with a paper tissue, but that scratches it and makes it useless.

Boris 24

You can buy USB external CD/DVD player for laptop.They are cheap