I’ll try to keep this brief and not so abstract, but I usually can’t help myself.
Timbre is determined by three things: An infinite set of frequencies, an infinite set of specific amplitudes and phases assigned to those frequencies, and the nature in which those variables change over time.
All sounds at any instant can be represented by these three variables. However, these change with time and can only be defined over a time interval if a tone is constant (such as certain simple digital synthesizer tones). The gradual or immediate variation of these variables is often associated with the word “timbre” when referring to the sound of an instrument.
So anyway, it all comes down to the sine waves that compose a particular sound. A sine wave is the fundamental sound and can form all sounds when played with other different sine waves. For example, a touch tone on a phone consists of two sine waves of two distinct frequencies added together. A saw wave contains an infinite number of them, but are limited to the harmonic frequencies and diminish in amplitude (and thus intensity) as the frequency increases.
Acoustic instruments such as pianos and guitars are much more complex with an amplitude and phase defined for every possible frequency in our range of hearing and beyond, of course changing its “shape” over time. Just as you would recognize a photograph of a familiar person or object, our ears use a similar format of information to relate certain sounds to their respective source.