The nervous system can be divided into two main parts: the central nervous system (CNS) and the peripheral nervous system (PNS). The CNS includes the brain and spinal cord, which are responsible for processing and coordinating information from the body's various sensory receptors and generating responses that control muscles and glands. The CNS is responsible for higher-order cognitive and emotional functions such as memory, learning, reasoning, and problem-solving. The PNS, on the other hand, includes all the nerves and ganglia located outside the CNS. The PNS is further divided into the somatic nervous system, which controls voluntary movements and sensory perception, and the autonomic nervous system, which regulates involuntary processes such as heart rate, digestion, and respiration.