It's a very complex system involving several parts. Sensory information about motion, equilibrium, and spatial orientation is provided by the vestibular system. Proprioceptive information from the skin, muscles, and joints. Sensory input from the eyes.
All these are integrated by the Celebellum...