The cochlea is the part of the inner ear that perceives sounds and passes them along to the brain. It is spiral shaped and contains numerous small hairs, each of which is sensitive to a particular frequency. The air pressure hitting the eardrum passes through the bones of the inner ear to the cochlea (actually lessening it's force) and, when the hairs receive (and amplify) sound, the signals are passed through the auditory nerve to the brain.
In most cases of deafness, the cochlea is perfectly functional, but the rest of the structure of the inner ear is often damaged in some way. As such, in the past few decades, a cochlear implant which replaces the natural stimulation of the inner ear bones with electrical signals from wires is used to treat deafness with various levels of success. However, even in the worst cases, deaf people can usually hear important environmental noises (such as fire alarms) and many progress to the point where they can pick up background conversations without having to concentrate on them.