When an object vibrates, its back-and-forth motion causes the molecules around it to vibrate as well, producing areas of high and low density -- called compressions and rarefactions -- that travel as longitudinal waves through the medium surrounding the object. If the molecules vibrate rapidly enough, you may hear these waves as sound.
The distance between each compression of a sound wave is called its wavelength. The shorter the wavelength, the more waves that pass a given point per second. Sound waves with short wavelengths cause our eardrums to vibrate with greater frequency -- that is, more times per second -- and we perceive these higher-frequency waves as higher-pitched sounds. Sound waves with longer wavelengths have lower frequencies and produce lower-pitched sounds.
In musical instruments such as a trombone or a clarinet, sound originates at the mouthpiece, where air blowing past either the musician's lips or a thin cane strip called a reed starts the vibrations. Blowing through the mouthpiece produces a range of frequencies. When the frequency of the vibrations matches the natural frequency at which the air inside the instrument vibrates, this produces the sound that we associate with the instrument.
By submerging one end of a straw in water and blowing across the other end, you can make the air inside the straw vibrate and, in turn, produce sound. Moving the straw up or down in the water changes the pitch of the sound in much the same way moving the slide arm of a trombone does: The movement alters the length of the air column in the tube. The longer the column of air, the longer the wavelength and the lower the frequency of the sound waves. The lower the frequency of the sound waves, the lower the pitch.