CD's are not 0s and 1s. They are pits burnt into the metal layer and are measured for lenght by the lazer and then converted into a digital format.
These pits (or the transition) represent bits: a 1 or a 0. All digital information must be stored in analog form including what is on your computer hard drive. However, the digital approach allows the use of a threshold level or clear demarcation between a 1 and a 0 that does not exist in analog approaches.
Example of a digital scheme (not from a CD)
Signal level between -.5 and +0.5 Volts = 0. Signal level between +0.51 to 1.5 volts = 1.
This means you can have a lot of analog error or noise in the media and still get a perfect translation of the data as exactly what it should be - a 1 or 0.
If you add parity bits or polynomial redundancy check bits to the data you can also improve the robustness further (allows detection of data errors or even allowing for recovery of completely missing data)
Using the same example, compare this to an entirely analog approach where the difference between 0.O and 0.4 volts may be significant.