Quality(or Timber) of sound differentiates between different musical instruments like guitar, sitar, and piano.
The quality of a sound describes the quality of the waveform which appears to the observer.
That means the quality of a note produced by the instrument depends upon the waveform and its different characteristics like frequency, amplitude, etc.
Different waveforms are produced even from a single instrument.
Two notes of the same loudness and pitch, played from the same or different instruments do not sound the same because the waveforms are different and hence the characteristics are also different.