Before the 19th century acoustics were based on the precepts of Anicius Manlius Severinus Boethius. He was a Roman scholar, Christian philosopher and politician of the 5-6th centuries. His works were the standard reference in Europe throughout the Middle Ages until the 18th century. One of his books, De Institutione Musica, translated as The Fundamentals of Music, was "the" book for all matters concerning music. In this book, Boethius compares sound propagation to the propagation of water waves. Nowadays Physics indeed encompass both phenomena under mechanical waves propagation.
How do musical instruments produce sound? All musical instruments have a part that vibrates. That part can be strings, reeds, membranes, as well as other things, such as the lips of a trumpet player, and it is called the "vibrating corpus". The vibration of the vibrating corpus produces mechanical waves in the actual substance of the instrument. These waves propagate, starting the propagation in the vibrating corpus itself. While propagating, those mechanical waves will repeatedly encounter the surfaces of the instrument. These surfaces, roughly said, are where the instrument ends and the air around and inside it begins; this boundary marks a change of density from a solid material to a gas. One part of those waves will be reflected on those surfaces, remaining in the substance of the instrument, and another part will get refracted through those surfaces into the air.
Thanks to their cavities (resonance boxes and the inside of pipes) musical instruments amplify the sound they produce, making it louder. This amplification occurs as follows: the air within the cavities gets from every refracting point the same waves in the same frequency. So many waves coming from every direction to the same and small amount of air inside of the instrument result in the superposition of all those waves, which means that while keeping their frequency, their peaks become higher and their troughs become deeper, which translates as a louder sound. Finally those amplified waves go out of the cavity through the holes of the resonance boxes and through the bottom and lateral holes of wind instruments.
In every instrument, the sound production process is exactly the same. The timbre of each instrument depends on the type, material and shape of both vibrating corpus and the whole instrument.
Mechanical waves
Sound is the translation that our brain does of the information perceived by our eardrums, the sensitive membrane of the aural system. What our eardrums perceive are mechanical waves. Normally we perceive these waves when they propagate through the air. These waves can also be perceived while they propagate through liquids, as whales and dolphins do in the ocean; or through solids: for instance when you listen to the tone of a tuning fork and as it vibrates you put it on your ear, or when a doctor examines you with a stethoscope.