I have a Sony Compact Disc Player, CDP-591. When
This has happened to me many times. After a player sits for a while, the lens that reads the discs can get a film/patina on it, especially if there has been cigarette smoke around it.
Take a q-tip with rubbing alcohol on it (almost none, like dip it and squeeze most out with your fingers). Then, very GENTLY, with almost NO pressure, wipe the lens with a circular motion for a few seconds. Then, flip the q-tip over and dry the lens with a circular motion for a few seconds. Then, quickly blow on the lens to dry it and remove any remaining q-tip fibers/debris (don't spit, lol).
This has worked for me many times. If you can't access the lens from/through the disc door, you'll have to open the unit, in which case you could also blow out all of the dirt/dust with a spray can of air or small air compressor first.
Also, if the player is an older player, and some of the discs are not store bought (like ones that you burned yourself), some might not play because your burn technology was/is more advanced than your player.