Digital is using an analog signal in a weird way.
Normally we use absolute values, e.g. a cartridge of a turntable sending a signal to a phono stage. Any change in the signal will be translate in a change of the sound including a spike when the airco start up.
In case of digital we still use analog signals (there are no digital electrons) but instead of using the absolute value, we are looking for a marked change of state.
A transistor is open or closed, a magnetic field is N-S or S-N, a pit or a land (remember CDs?), etc.
All the time there is very marked change of state.
Conceptually this is represented by our bits, a binary unit that can have only 2 values also conceptually represented by 0 and 1.
This is what makes digital so robust. We don’t use the absolute values, we use this marked change of state to detect our bits.
This is done by sending block pulses.
In case of audio, SPDIF, USB, Ethernet, etc are well known examples.
This is how a block pulse might looks in real life.
If this would be interpreted as an analog signal (using the absolute value), this would be a disaster.
The over/under shoot, the rise/fall time, the ringing, etc., all would manifest themselves as distortion.
The moment our interpretation is digital (the electrons remains analog of course), we don’t have these problems.
Despite all the distortions, we can clearly detect the rise to approximately 100% and the fall to approximately 0% of the signal.
As long as we are able to detect this marked change of state accurately at the receiver, we will receive not only the right bits, but will also be able to reconstruct the signal.
This is why digital is to a large extend insensitive to noise and can be delivered all around the world without loss in accuracy.