Optical and Coaxial cables are both able to transmit SP/DIF and PCM information of up to 24bit/192kHz. A coaxial cable retains this information in an electrical digital state whilst an optical cable converts it to a light beam for the transmission from unit to unit.
In theory, the conversion of a signal to light and back means that coaxial is superior up to lengths of 5m. For lengths over 5m, optical has the advantage. In practice, there are few domestic situations that would show up any differences between a reasonable quality example of each cable.