The sound wave produces a vibrating object. In this case, the vibrating string strings put the surrounding air molecules into vibrational motion. The frequency at which vibrates air molecules is equal to the frequency of the guitar strings. Vibrations of air molecules are temporary, and after a while, they return to their original position. Vibrations of air molecules create a wave of pressure that travels outside its source. This pressure creates compressions and rarefactions. Due to this pressure, the air molecules compress in a small space. Replacing compression and rarefactons is actually a sound wave. In this sense, the sound wave transfers energy from one place to another without the transport of matter. By increasing the frequency of the strings, the frequency of the vibrating air molecules increases and a louder sound is obtained.
The guitar string does not produce a high frequency by itself, and therefore the surrounding air molecules very little vibrate and produce a sound that is not loud. When the strings are attached to the acoustic guitar box, which is made of wood, then the guitar wood begins vibrating with the same frequency as the strings. Due to the large surface of the wooden guitar box, which vibrates with the same frequency as the strings, the box starts to mobilize a much larger number of air molecules to vibrate, thereby gaining a louder sound.