Neurons enter and exit the spinal cord through 31 sets of nerve roots, which are a part of the peripheral nervous system (PNS). Each set is made up of two dorsal (= posterior) roots and two ventral (= anterior) roots. The roots branch into several rootlets before attaching to the spinal cord. Each dorsal root allows several sensory neurons to enter the spinal cord and each ventral root allows several motor neurons exit the spinal cord.
A small bulge called the dorsal root ganglion (= spinal ganglion) occurs along each dorsal root. Inside this area are the cell bodies of the sensory neurons. The ganglia lie just within the vertebral column, which helps protect them from damage.
Lateral to the ganglion, the two roots fuse to form a spinal nerve. Openings between adjacent vertebrae called intervertebral foramina allow the spinal nerves to exit the vertebral column.