Sorry if I was dense. I might have made things unnecessarily complicated.
Digital - a signal having digital signal levels. Most often we think of digital as having two different values, either 0 or 1.
Analog - something having any level (within a range of course).
When you transmit a digital electrical signal over a physical cable it migh swing betwen, say -4.5V and +4.5V. It will over time have any of the values in between. If nothing else the transition from one value to the other does take some time. So the cable is analog, that is transmitting any electrical value. But the values are interpreted as a digital signal. Not by the cable, which could not care less, but by the receiving end. In order to have a bit of margin it might be set to regard anything above +1.5V as a digital 0 and anything below -1.5V as a digital 1. All of this is described in the "protocol". Protocols are often published as books or papers and typically named things. Examples of protocols are RS232, AES/EBU, SPDIF, Ethernet, BlueTooth and so on. Designing protocols is a highly specialized technical skill, very few people has done that. A typical protrocol describes cables, contacts, electrical signal, limits on length and voltages as well as how the digital bits going over the cable are to be interpreted.
An optical cable transmits light. It could have just about any wavelength (= color) and any strength from pitch black over moon-light to full sun. The cable really dose not care. In that respect the cable is analog. But when we use it for SPDIF over TOSLINK we elect to use it to transfer a digital signal. The sender and receiver decides on how to interpret quite dark and rather light as a digital signal passing over the cable. So we use the cable for a digital signal.
There is no AD conversion taking place, at least not in the meaning we as audio people generally use the world. But there sure is specialized circuits connecting between the computer world inside each box and the outside real world where the cable transmits electrical or optical impulses.
Hope this helps, otherwise I guess I turned a bit too technical / philosophical. Guess my back ground in designing electronic circuits as well as computer protocols comes in the way at times.
Gunnar