Sound quality can be defined as the degree of accuracy with which a device records or emits the original sound waves. This accuracy depends on the range of sound which is sampled, the rate at which it is sampled, and the various conversions that occur in any sound reproduction system.
The range of sound (in KHz) which the equipment detecting the sound samples affects sound quality. Humans can hear vibrations up to approximately 24Khz, so sampling that doesn't extend this far this will have a detrimental effect on the resultant quality.
The rate at which the sound is sampled refers to the amount of information the detection equipment records about each second of sound. More information about the shape of the sound waves results in a more accurate sample, in other words, this is due to the digital quantization of the analogue sound wave. On computers the sample rate is measured in Kbps.
The conversions of sample range and sample rate between different pieces of equipment in a sound recording and reproduction system will affect the quality of the sound. More conversions generally results in a lower level of quality.