Capsaicin is a chemical that gives us a lot of pain and a lot of pleasure, sometimes simultaneously. If you isolate capsaicin it is a white crystalline powder, but in nature it is what makes hot chile peppers hot. Capsaicin is a protective chemical for chiles because it prevents animals from eating them. Birds are not affected by the heat, so they do eat the chiles and then spread the seeds around in their droppings.
There are more than 3000 varieties of chiles on earth, and they have a wide ranges of capsaicin, from the mild anaheim chile to the off the charts habanero, and the new king of hot chiles, the bhut jolokia. The heat of chiles is measured in Scoville Heat Units, with sweet bell peppers clocking in at 0 SHUs, a medium heat pepper like the jalapeno around 2000 SHU's, the bhut jolokia at around 1,000,000 SHUs, and pure capsaicin at 16,000,000 SHU's. You can read more about this and see the Scoville Heat Units of some common chiles at africanchop.com.
What can capsaicin do for us besides make our food really interesting? A common medical use for capsaicin is as a topical pain reliever. It is used to treat a condition called peripheral neuropathy, which causes pain in the nerve endings right below the skin. An ointment with capsaicin actually creates a burning sensation which overloads the receptors and temporarily stops the sensation of pain. The burning you feel from capsaicin, whether on the skin or in your mouth when you are eating chiles, is not actual chemical burning, but just a sensation of burning. Topical capsaicin is also used to relieve pain from sore muscles, strains or sprains, and arthritis.
Some studies have shown that capsaicin cream can help to improve psoriasis and other skin problems. You should never put capsaicin on broken skin or mucous membranes as it will be very painful and irritating. Capsaicin has been used as a nasal spray to help with certain types of headaches.
Until a few years ago it was thought that chile peppers aggravated stomach ulcers, and people were advised not to eat them. Now we know that ulcers are caused by a bacteria, Helicobacter Pylori, and capsaicin in chile peppers actually has a protective effect against them. It inhibits acid secretion in the stomach, and helps increase blood flow to the stomach membrane, which keeps it in a healthy state.
A study published by Cancer Research in March 2006 showed that capsaicin inhibited the growth of prostate cancer cells. This study was done on mice implanted with human prostate cells. This is a promising result for the future of capsaicin as a possible cancer treatment or prevention.
Capsaicin isn't destroyed by heat, as you know from eating your spicy hot foods. It dissolves much more easily in alcohol and vegetable oils than in water. The best way to relieve the burn from eating chiles is with milk, because the casein in milk easily latches onto the fatty parts in capsaicin and washes it away.
Capsaicin makes your body produce endorphins, which create a euphoric feeling. This is why some people just can't get enough of spicy foods. Eating too much capsaicin can have unpleasant effects like nausea, sweating, flushing of skin, or vomiting. Capsaicin can be toxic in large enough doses, but it would be difficult for someone to eat enough to actually do lasting damage.