Capsaicin is the chemical compound that accounts for the heat in chilli peppers. The burning sensation is caused by stimulation of heat sensors, but does not actually increase body temperature.
Capsaicin is the principal ingredient in pepper spray, used for riot control and personal protection. Tarantula venom activates the same pain pathway as capsaicin.
Medicinally, it can be applied topically in ointments and creams to treat pain. This effect is believed to result from nerves being overwhelmed by the burning sensation and temporarily unable to "report" pain.
The hotness of different varieties of chilli is measured using the Scoville Scale, named after Wilbur Scoville who developed the test in 1912. As originally devised, a solution of the pepper extract is diluted in sugar water until the 'heat' is no longer detectable to a panel of tasters; the degree of dilution gives its measure on the Scoville scale.
Today, capsaicin concentrations are usually determined using High Pressure Liquid Chromatography.
Chillis are members of the Solanaceae, one of the world's most important food families that includes potato, bell pepper, tomato and aubergine.