The ear maintains equilibrium by detecting the position and the motion of the body.
The sacculus and utriculus are found just above the cochlea. They are interconnecting chambers that are each filled with fluid. There are hair cells inside each chamber. Attached to the hair cells are tiny spheres of calcium carbonate called ear stones. As the head moves, the ear stones move. The movement of the ear stones initiate an action potential that is sent to the brain. In this way, we are able to detect the orientation of our bodies.
Motion is detected by the semicircular canals of the ear. These canals are found on the top of the inner ear. There are hair cells at each end of the canals. The movement of the fluid in the canals lags compared to the movement of our bodies. This results in a relative motion between the walls of the canals and the fluid (endolymph). Thus, the hair cells move and send messages to the brain. The brain is then able to detect movement.