The video below is an excellent animation of how hearing works. The ear is divided into three main parts:

How Hearing Works – Outer ear

This consists of the pinna (the part you can see) and the ear canal. The outer ear collects sound and channels it to the eardrum.

How Hearing Works – Middle ear

This is the eardrum and, behind it, an air-filled space containing three tiny bones. The middle ear transmits sound vibrations from the eardrum to the inner ear. The Eustachian tube ventilates the middle ear to the back of the nose (nasopharynx) allowing pressure in the middle ear to equalise with the outside air pressure.

How Hearing Works – Inner ear

The inner ear consists of the hearing organ (cochlea) and balance organ (semicircular canals). The cochlea is a fluid-filled space containing sensory hairs which vibrate in response to sound waves in the fluid. These vibrations are transmitted to the hearing nerve and then to the brain.