Neuronal circuits and behavior

How does the nervous system process sensory information, make decisions, and produce actions? What is the rationale behind its design?