Substance P is primarily involved in the transmission of pain and inflammatory signals. It binds to the neurokinin-1 (NK1) receptor, leading to various physiological responses. These include vasodilation, smooth muscle contraction, and the release of other inflammatory mediators. Substance P also influences mood, anxiety, and stress responses.