Data on a regular CD is stored by making bumps or pits (hole) on the CD medium. This disturbs the reflection of light. A
0 or a
1 is determined by either reflection or non-reflection of light.
A CD-R works somewhat the same. It has a reflective surface, but this surface is covered by a dye. You can use a relative high intensity LASER to heat up the dye layer and turn it opaque. Afterwards the CD-R can be read in the same was as a normal CD. Light is either reflected or not.
CD-RW's work in the same way, but use a paint which can be turned opaque or not depending on the heat of the LASER.
Unlike the dye in CD-RW's, the Dye in a CD-R can not be reverted to its previous state. This is what prevents rewriting to an already written CD-R.
Nitpick exception: Rewriting with the same image or a image with only the right bit changed is technically possible, but I know of no software which would allow it. And that really is an edge-case.