Only high-end soundcards and motherboards offer SPDIF outputs and inputs. Sound cards that provide external SPDIF connection are supplied with an adapter card, shown on Figure 10. Note that this card has both an optical fiber connector (square) and a coaxial cable connector (round). You can also install a similar device to enable external SPDIF connection on motherboards with the SPDIF connector shown on Figures 3 and 4.

Figure 10: Sound Card SPDIF Extender.
High-end motherboards with on-board audio are usually supplied with external SPDIF connectors directly soldered to the motherboard (coaxial and/or optical) or thru the use of an adaptor like the one shown on Figure 10.

Figure 10: Detail of the Optical SPDIF Output of the ABIT IT7 Board.

Figure 11: Detail of coaxial SPDIF input and output available on DFI LAN Party 925X-T2.
If you really care about SPDIF connection, you should pay attention when buying your high-end sound card or motherboard. Specially with motherboards, some do not offer all four possible options: optical SPDIF input, optical SPDIF output, coaxial SPDIF input and coaxial SPDIF output. Many high-end motherboards only offer outputs, not inputs (as it occurs on Figure 10, where we have only optical SPDIF output; we give another example on Figure 12, where the motherboard adaptor has only coaxial and optical SPDIF outputs, no inputs). Having only outputs is great for those users that are willing to connect their PCs to a home theater receiver and enjoy full 5.1 audio experience at the best quality, but won't allow them to record on their PC audio generated on external devices like Mini Discs using the SPDIF connection - feature that is indispensable for those that will work with digital audio.

Figure 12: SPDIF adaptor from Gigabyte K8NNXP motherboard has only outputs (both optical and coaxial).
Actually, this is just a matter of the SPDIF adaptor (like the one shown on Figure 12). Usually the motherboard can have the four options, but is limited by the adaptor provided by the manufacturer. In theory, if you could get an adaptor with the four options, it would work fine.
Summary
In summary, if you are connecting an external digital audio source to a computer that includes a SPDIF connection, go for using it, and avoid using the standard analog connection. If you are an audiophile or work professionally in the audio field, getting this type of sound card or motherboard is a must. Inside your PC you can get better audio quality from your CD or DVD drive by connecting it to the sound card or motherboard thru its SPDIF connector instead of the regular "audio out", which is analog.