The 'hotness' in spicy foods comes from capsaicin, a crystalline alkaliod in peppers.
Once your mouth already burning from all that spiciness, the most popular remedy is to drink milk, take some sour cream, or any dairy products. This is because the dairy products acts as a diluent to the oil-based spices. When you eat spicy foods, the oil will coat your tongue and throat; hence, the sensation of a "burning" oral cavity is heightened. Drinking water may be help but we know water and oil don't mix. Citric acid, fruit juices can bring down the heat too.