The ear has two functions:
(1) sound detection (hearing)
(2) detection of movement/acceleration (involved in control of balance and eye movements)
Sound is picked up by the outer ear and transmitted via the middle ear (through three small bones) to the inner ear where sound vibrations are converted to nerve signals which are passed on to the brain.
The balance part of the ear detects movement and gravity. This information is used by the brain to control eye neck and leg movements, to maintain balance and providing awareness of spatial orientation.