Capsaicin is an organic molecule found in hot peppers. In mammals, it stimulates a particular receptor in neurons which is perceived by the brain as a burning sensation. It triggers this response throughout the body, including the skin and mucous membranes.
In small quantities, capsaicin and it's associated compounds are used to flavor food and are a major flavoring in many national cuisines. However, in large quantities, such as those in pepper spray, it can cause extreme pain and even tissue damage due to the body's autoimmune response. As the molecule is not soluble in water, but is soluble in oils, treatment usually consists of applying oily lotions to affected areas. However, capsaicin's effects can last for a lengthy period of time after exposure.