The spinal cord functions primarily in the transmission of neural signals between the brain and the rest of the body.