The brain is the center of the nervous system in all vertebrate, and most invertebrate, animals. Some primitive animals such as jellyfish and starfish have a decentralized nervous system without a brain, while sponges lack any nervous system at all. In vertebrates, the brain is located in the head, protected by the skull and close to the primary sensory apparatus of vision, hearing, balance, taste, and smell.
The brain is encased in the head, the part of the body which in most walking, flying or swimming animals is the leading end of the moving body (with few exceptions: starfish, cuttlefish, humans, penguins when they are not swimming). The obvious risks which this localization entails are apparently compensated by the advantage of direct short connections with the sense organs localized in or on top of the head (olfaction, taste, vision, audition, vestibular sense), which together with the brain could be seen as something like the cockpit of the animal, or the pilot if one prefers.