A musical note is a vibration in the air at a constant speed. 440 vibrations per second, for instance, is what musicians call "middle C". But if you play middle C on a piano it sounds different to if you play it on a violin or a recorder or a set of bagpipes. Musicians refer to this "texture" the musical note has as the timbre (pronounced tom-bruh) and it's the french word for "sound quality". The reason different instruments produce a different timbre is because when a musical instrument plays a note, it isn't playing JUST that note.
A piano, when you press middle C, is vibrating a string inside it at 440 vib per sec, but it's also, at a slightly lower amplitude playing 880 vib per sec. This higher version of the same note is a called a "harmonic" of the initial frequency. Not only that, but the vibrating air inside the piano is bouncing off the walls of the piano, interfering with other strings and playing the notes either side of it a little bit, for instance playing 293.7 (middle D). The main note you hear is 440, but this is combined with other notes called "overtones". The combination of overtones, harmonics and the original note together are what produce the different sound quality of an instrument.
If you use a signal generator you can create a "pure" note; the kind you might have heard your Physics teacher generating with a speaker. It sounds electronic. But if you add in overtones and harmonics at different amplitudes you can simulate the sounds of other instruments (which is how synthesisers do it). So, different sound quality is all about mathematics: combine the right frequencies in the right order and the right amplitudes and you can simulate anything from a Cello playing a B flat, to a Giraffe sneezing!