Quality of sound is the characteristic that allows us to distinguish sounds from two different sources even though the sound produced by them has same frequency and loudness. This happens because with every single frequency, called fundamental frequency, many other frequencies, known as harmonics, are also generated with differing loudness.
The quality of sound is determined by the frequencies present in it and their relative loudness.