A CD recorder writes data to a CD-R disc by pulsing its laser to heat areas of the organic dye layer. The writing process does not produce indentations (pits); instead, the heat permanently changes the optical properties of the dye, changing the reflectivity of those areas.
From the Wikipedia article.
https://en.wikipedia.org/wiki/CD-R#Writing_methods