Brian (a different Brian) asked via Twitter:
There are all sorts of foods that irritate the senses, and we love many of those irritants. Usually, when people talk about spicy food, though, they're talking about chills. The class of chemicals responsible for a chili's spiciness are capsaicins.
First, the why: chili peppers are fruits, and fruits usually make themselves inviting to eat in order to get animals to eat them. The animals keep the seeds around for a while, and eventually rid themselves of the seeds in the usual way. Time passes, and the seeds take their nutrient-rich environment and grow into plants. It's a very impressive evolutionary strategy.
Chili seeds, unlike many fruit seeds, are destroyed by the high acid content of mammal stomaches. In order to combat the destruction of potential new plants, chili peppers evolved the ability to generate capsaicins which irritate the taste buds of mammals. In situations where it's harder to grow, such as dry temperatures, the spiciness is concentrated even more.
So how do chilis spread their seeds? Bird stomaches don't harm the seeds, and birds can't taste capsaicin, so no problems there. Birds eat the chili peppers, fly away, drop the seeds after a while, and the circle of life continues.
So, back to the main question, which is: how does this work? Molecules work in two ways. The first is kind of a magnetic attraction, based on the number of electrons available to the atoms. I don't think we want to go into the details right now, but the short of it is that some atoms will stick to other atoms really well, while other atoms completely ignore the space.
The second way molecules, especially proteins, work is by shape. We talked about this a bit in Freezer Burn, but essentially molecules will have these atoms inside them waiting for a matching atom to come along, but the molecules themselves can be in all sorts of crazy shapes. Proteins change shape all the time, based on temperature or physical agitation or any of a number of outside forces. When you cook, you are more often than not reshaping these proteins and exposing the available atoms to other atoms that can click together in the right way.
|Spicy Peanut Noodles with Ground Pork & Shredded Vegetables||Beef Enchiladas with Salsa Verde||Spicy Chicken & White Bean Chili|
Some nerve cells have what is called a vanilloid receptor, and this receptor is one of the things that capsaicin is specially shaped to attach to. Once it does, it activates that nerve intensely, which is interpreted as heat and pain and a little bit itching, depending on the nerve and probably the variety of capsaicin. The capsaicin is also surrounded by oil, so that it's really hard to wash off of you when it touches your skin, tongue, or eye.
Because the capsaicin is so intense when it activates the nerve, the nerve gets kind of worn out. This is why, if you eat a lot of spicy food, you become desensitized to it. Eventually the nerves recover, so if you stop eating spicy food after a while, you will lose your ability to tolerate it, until you beat down the nerve cells again.
The ability of capsaicin to desensitize heat and pain receptors is really handy for people suffering from chronic pain of all kinds. There are, in fact, all sorts of medical uses for capsaicin, and scientists are finding more all the time.