The sensation of pain is primarily processed in the spinal cord, with significant involvement from the brain. When a nerve is stimulated, the signal travels to the spinal cord, ascends to the brainstem, and reaches the thalamus, which acts as a relay station. From the thalamus, the information is sent to the primary somatosensory cortex located in the parietal lobe, where it is mapped and processed. This cortex is responsible for interpreting sensory input from various body parts, with a notable cross-wiring observed between the foot and genital areas, potentially explaining certain fetishes. The processing of pain signals is complex and involves multiple brain regions, highlighting the intricate nature of how the brain perceives and interprets pain.