Car cd player gone crazy

the cd player in my truck started making clicking noise when I put the cd in, then it will try to read it and spits it back out. Heres the strange part…If I wait until my car has been parked and off for awhile then go crank it up and put a cd in, it reads it every time. I just cant take it out or I wont be able to put another one in. It some times doesn’t let me do it if it is hot outside and my cars been sitting in the sun. Is there a way to keep it cool? what can i do? I cant afford a new cd player right now.

Maybe the cd player needs a clean up?