Capsaicin is what makes chili peppers hot. It is an irritant for mammals, but not for birds. This may be because birds spread the seeds better than mammals. It causes a burning sensation in any mammalian tissue it comes into contact with.
Capsaicin is a nonpolar molecule — it dissolves in fats and oils, not in water. This is why drinking water does not take away the burning sensation, but drinking whole milk or other fat containing liquids or foods will.
As an ingredient in medicines, capsaicin is used to relieve pain from arthritis, muscle aches, and sprains. It is a rubefacient, meaning it dilates blood vessels. The "heat" effect overwhelms nerves, causing a localized numbing sensation.
Capsaicin is also used in pepper spray.