The spinal cord contains gray matter containing nerve cell bodies and white matter containing nerve fibers or tracts. It is surrounded by three layers of meninges and bathed in cerebrospinal fluid. Spinal nerves emerge from the spinal cord, carrying sensory information to the brain and motor commands to muscles and organs. Reflexes are automatic responses mediated by circuits in the spinal cord that link sensory input to motor output without involving the brain.