A fluid flows around the vestibular system, the section of the inner ear involved with balance, impinging on specialized sensory cells and generating signals that are used by the brain to determine the body's orientation, according to Wikipedia. The vestibular system is composed of the vestibule, a network of tubes known as the semicircular canals, otoliths and a structure called the cupula, which is home to the specialized sensory cells.
To detect movement in all planes, the vestibular system has semicircular canals arranged at approximate right angles to each other, with fluid moving through them, according to Wikipedia. When the body changes orientation, the fluid moves and places pressure on the cupula. Extremely fine hair cells located in the cupula respond to movement of the fluid and generate electrical signals that are sent to the brain.
To maintain balance, the brain also relies on visual and muscular systems, adds Patient.co.uk. Signals from the cupula are sent to those parts of the brain that control the muscles that move the eyes and those that help maintain posture. The information is aggregated and used to control movements as varied as running, walking, pirouetting and cartwheeling. To allow for extremely quick reflex actions, such as those needed to avoid a fall after an involuntary stumble, the brain also sends the information to the spinal cord.