The nervous system transmits information within and between different parts of the body in order to coordinate and regulate bodily functions. It is divided into two main components: the central nervous system (CNS), which consists of the brain and spinal cord, and the peripheral nervous system (PNS), which includes all nervous system structures located outside of the CNS.