By now most of us know to avoid the membranes and seeds of a hot pepper if we wish to avoid setting fire to our mouths. That painful burning sensation associated with spicy peppers is due to the capsaicin molecules that are most concentrated in their seeds. We can't actually taste the capsaicin; rather we feel them on our tongues, which are lined with receptors called TRPV1 that activate in the presence of capsaicin.
Once bound to TRPV1 receptors, capsaicin triggers signals in the brain can make it feel as though your mouth is engulfed in flames. Interestingly, the same signals can be elicited by these receptors in the presence of physical heat, hence why the resulting sensations from eating hot peppers is often described as a burn. Also, have you ever touched your eyes after cutting a pepper? That same burning sensation is because TRVP1 receptors exist elsewhere on the body, which is why you should always wash your hands after handling hot peppers!
We've heard of drinking milk to relieve the burn from hot peppers. And as it turns out, this old adage is true and can be backed up by chemistry! Milk happens to be a non-polar solution, which is perfect for dissolving the non-polar capsaicin molecules. It pulls the capsaicin from the TRVP1 receptors and stops the brain from sending more unpleasant signals. On the contrary, water is a polar solution and can actually make things worse by swishing capsaicin around in your mouth and activating more TRVP1 receptors!
So, next time you eat spicy foods, have a glass of milk handy. Also, know that every spicy bite can increase your tolerance level for more spicy foods in the future!