A nervous system is a set of specialized cells (neurons and glial cells) that enables most animals to sense their environment and the state of their own bodies and to respond in beneficial ways to internal and external changes. All animals above the sponges (Porifera) have a nervous system of some sort.
The nervous system is the basis for the complex behavior of animals; the complexity of behavior is matched by the complexity of the nervous system. Nervous systems vary in complexity from the primitive, decentralized systems of jellyfish and its cousins (Cnidaria) to the centralized nervous systems of the mammals (Mammalia), particularly the primates. The human nervous system is king of the nervous system hill.
In gross architecture, a nervous system has three basic classes of neurons. Sensory neurons detect changes in energy or chemical reactions; they provide the input to the system. Motor neurons excite certain tissues in the animal's body to cause a response to a change detected by the sensory neurons. Interneurons connect the sensory neurons to the motor neurons; they may form complex neural networks that process the input from sensory neurons in various ways. In the most advanced nervous systems, the interneurons form the central nervous system, which is the brain, brain stem, spinal cord, and parts of the autonomic nervous system. The motor and sensory neurons constitute the peripheral nervous system.
The simplest nervous system could be formed by just two neurons, a sensory neuron and a motor neuron. It is even possible for one cell to have both functions. The behavior produced by such a system would be a simple reflex, with no intermediate processing of information involved. This kind of neural configuration is called a reflex arc, and occurs even in complex nervous systems. The human knee-jerk reflex, for example, results when a stretch sensing neuron in the knee triggers a motor neuron of the spinal cord that causes the quadriceps muscle to contract.
Nervous systems become more interesting when a large network of interneurons connects many sensory neurons to many motor neurons. This neural net configuration allows the input from the various sensory neurons to be integrated, modulated by the states of various subnetworks and otherwise processed before the motor neurons are triggered. This is the basis of complex behavior and the first step toward the development of brains and minds. Keep in mind though, that we are still speaking of nervous systems on the development level of roundworms (Nematoda).
The flatworms (Platyhelminthes) represent an important advance in the development of the nervous system. The planarian flatworms (Planaria) were the first animal to achieve bilateral symmetry in body and a central nerve net that is complex enough to be thought of as a brain. The brain and two light-sensitive eyespots are located at one end of the worm, making the planarian the first animal to get a head, so to speak. It's worth noting that the neobrain and eyespots are near the worm's feeding tube.
Nervous system evolution has apparently been encouraged by the survival advantage of being able to move around to get food. That is an ability which requires exactly what the nervous system provides, sensation and motor control. It is interesting that development of the brain in particular seems to be associated strongly with the development of jaws and predation.
The nervous system really comes into its own in the 'higher' animals, the ones that have skeletons. Bones allow for leveraged muscle movements, and the spine and skull provide physical protection for the spinal cord and brain.
So it seems that now humankind is at the pinnacle of nervous system development. Our marvelously complex nervous system provides us with astounding ability to understand our environment and ourselves, and to predict the outcome of our own complex behavior as individuals and collectively as various levels of society. We can sense and act, but we are also sentient. We can know aspects of ourselves and we can postulate and imagine. As a species we are capable of creating forces that are sufficient to destroy ourselves and the world we share with the rest of lifekind.
Still,it's extremely difficult to believe that we are the final end product of the evolution of the nervous system. Religious considerations aside, we must wonder what new developments in the nervous system might eclipse us as we have eclipsed the lower primates? I wonder even more whether we would ever allow ourselves to be so eclipsed, as we are capable of recognizing that which is different and possibly better than us, and eliminating it.
Cool interactive map