Sound waves cause changes in pressure. At any one instant there will be series of compressions (where air molecules are compressed together) and rarefactions (where the air molecules are furtheraway). Theses then travel away from the source
When a sound wave enters the human ear canal, the changing pressure causes the eardrum to vibrate. These vibrations are passed on to tiny bones which amplify the vibrations. The vibrations are passed on to the liquid inside the cochlea which contains a long, narrow membrane which also vibrates. Different parts of the membrane detect different frequencies. The membrane is covered in tiny hairs and the haircells convert vibrations into electrical signals. The brain interprets these signals from different parts of the membrane as different pitches of sound.