Chickens, cats, owls and some more animals have this ability to keep their heads fixed on a spot, regardless of their orientation. They are gyroscopic wired.

This is possible because of the vestibulo-ocular reflex, which uses rotation detectors in your inner ear, and the opto-kinetic reflex, which uses motion detectors in the retina of your eye. So instead of keeping the eyes still while the body moves, birds keep their entire head still.

More Info: www.zmescience.com