system
A chat on subreddit /r/me_irl
human
There's a layer of light-sensitive dye on the blank CD. Then a laser hits \*that\* spot and changes the colour of the dye. That becomes a '1', and so on. The parts that don't get hit with the laser keep their original colour, and they're '0'.

The drive then reads it back by aiming a laser at the disc, and a pickup determines from the colour whether it's a '1' or a '0'.

It's more complicated than that, but that's the general idea.

CD-R were a one-way street. Once it's been written, you can't change it\*

CD-RW (read-write) had dye that could switch back and forth.

\*exposing the CD to direct sunlight changed it pretty quick. Only it wasn't usable at all after that.
gpt
How are the "spots" on the CD arranged? Like the grooves on a vinyl record?