The body of a musical instrument, such as a trombone or violin, isn't what makes sound. It's the vibrating column of air inside the instrument that produces what we hear.
However, the shape and size of the instrument determines the sounds it creates. Only the sound waves that fit in the instrument are audible. These are the waves that resonate (get louder) within the instrument. The waves that don't fit are simply lost.
You can visualize this phenomenon by imagining a child on a swing. After you start the swinging process, the swing finds a natural pace, or frequency. Trying to push faster or slower just disrupts the swinging (and makes your kid very frustrated with you).
Tubas resonate at low frequencies. That's why they make deep, low sounds. A piccolo, with its tiny, short enclosure, naturally resonates at high, piercing frequencies. Thus, instrument makers keep the properties of resonance very much in mind as they design each piece.