In the dorsal horn of the spinal cord, pain signals are modulated by various interneurons and neurotransmitters. This process, known as spinal modulation, can either amplify or inhibit pain signals before they are transmitted to the brain. Key neurotransmitters involved in this modulation include substance P, glutamate, and gamma-aminobutyric acid (GABA).