The burning sensation when eating something spicy is one that we can all relate to, but why does it burn even when the food has cooled down?
The chemical that is responsible for the burning is called capsaicin, which is present in the see-baring tissue in chillis.
Capsaicin is an irritant for all mammals where it binds to the TRPV1 receptors on mucus membrane tissue, such as your tongue. TRPV1 are receptors that are responsible for detection of body temperature and will initiate a sensation of heat and pain when triggered. The receptors can also be found on other parts of your body, such as eyes and inside your nose.
Chilli seeds are dispersed by birds, and as such bird TRPV1 receptors do not respond to capsaicin. Any burning and birds would stop eating the chillis, thereby stopping the dispersal of seeds in their droppings. The reason why mammals are so sensitive is perhaps down to the fact that mammals chew their food, crushing the seeds and preventing their germination.
The Scoville scale, developed by Wilbur Scoville, is a way of measuring the potency of heat in certain chilli peppers, with the hottest recorded being the Trinidad Moruga Scorpion.
Contrary to the chilli's intention, some people really enjoy eating chilli peppers. This is mainly attributed to the counter-intuitive release of endorphins due to the pain. One way of combating the painful experience of capsaicin is by using oily and fatty products, such as milk or yoghurt. Other water-based liquids won't help as they further spread the molecule around the mouth, covering more receptors.