And just to clarify... Any "noise" that gets into the audio is usually analog, and it is possible to get ground-loop noise into the analog circuitry through a digital electrical connection. If you get power line hum or power supply whine, through the digital connection, an optical connection will prevent that.
Any noise in the digital signal that causes noise in the audio is data corruption and might be heard as clicks & pops or audio dropouts. But in general, digital is highly-immune to noise or corruption and it's usually bit-perfect or terrible. ...One flipped bit in your bank account is equally likely to cause a 1-cent error or a billion dollar error, so you don't often get slight corruption or slight data errors.