This is due to the structure of the inner ear: the vestibular apparatus and the refined work done in synergy by the tendon and muscle receptors.
These send information to the brain which, in turn, is ready to quickly correct the movement to keep the cat in balance.