The only use for optical in home audio is for SPDIF transmission. Another name for this type of physical connection is Toslink. This type of connection can be used to connect a CD player, DVD player, Gaming system, certain audio cards on computers, satellite receivers, and many other sources to a home theater receiver or preamp/processor. It is used for the transmission of 2 channel PCM, Dolby Digital and DTS bitstreams to a capable receiver or processor for decoding.
An example of Toslink is shown below.
An example of Toslink inputs on a receiver...
And Toslink output on a DVD player (the rca connector next to the optical serves the same purpose, it is known as Coaxial).