Can anyone explain that what kind of sound a piezo can and cannot produce when compared to A speaker. Can it just play notes? Is there some quality reduction in piezo buzzer?
While they are similar in that they are both mechanical, and have a resonance, a piezo buzzer and a loudspeaker are designed for different purposes.
The buzzer is designed to be energy efficient, and only has to output a binary condition, sounding, or silent. Its resonance is very narrow, so that the driver can just drive the dissipation part of its impedance, and output a strong signal. The resonance is placed in the middle of the audio band (in fact all my beepers tend to be on the same note, minute minders, microwave, ansaphone, I can't tell them apart!) and it's so inefficient at converting electrical input to sound power at any other frequency, it's only ever used on one frequency.
The loudspeaker is designed to be wideband, so the resonance is pushed to as low a frequency as feasible (for its size, cost and market segment). It's inefficient at higher frequencies, but more or less equally so, so has a reasonably flat electrical to sound gain over a wide range of frequencies.