The nervous system is divided into two main components: the central nervous system (CNS) and the peripheral nervous system (PNS). The CNS consists of the brain and spinal cord, while the PNS includes all the nerves that extend from the CNS to the rest of the body.