The ear consists of three parts: the outer ear, middle ear and inner ear.

Sound waves come into the outer (external) ear and hit the eardrum causing it to vibrate. Behind the eardrum, in the middle ear, are three tiny bones (ossicles) - the malleus, incus, and stapes. The vibrations pass from the eardrum to these middle ear bones. The bones then transmit the vibrations to the cochlea in the inner ear.
The cochlea contains tiny cells called hair cells which move in response to the vibrations passed from the ossicles. The movement of these hair cells generates an electrical signal that is transmitted to the brain through the auditory nerve. The cochlea converts the vibrations to sound signals which are sent down the ear nerve to the brain and this is what we hear.