Human beings’ tongue has numerous sensory cells in as many minute depressions which have property of identifying tastes. They are known as taste buds. (See microscopic photo in the left.) Some taste buds identify sweet taste whereas some recognize bitter taste. Similarly, there are separate taste buds for identification of peppery hot and astringent tastes. We experience specific taste when molecules of a substance exactly fit in taste buds having property of that taste. If abundant taste buds have identified hot peppery taste then the substance eaten tastes very hot. Red or green chilly contains a natural compound named capsaicin. The size of molecules of capsaicin exactly fits in the taste buds which recognize hot taste. Sharp hot sensation on the tongue as the molecules of capsaicin simultaneously settle on the taste buds makes one noisily suck air
Just like an already switched on electrical appliance starts whirring as soon as its plug is inserted in the socket the brain gets sharp hot signal as the molecules of capsaicin fit in the taste buds so we find taste of chilly ‘hot’! Of course, there are some varieties of chilly which contain much less capsaicin compound so they do not taste very hot.
Hot sting of chilly on the tongue can be removed by holding some milk in the mouth. A protein named casein contained in milk ejects capsaicin from the taste buds and tries to occupy them. But the molecules of casein do not exactly fit in those taste buds. However, having ejected capsaicin they certainly give relief from the burning hot sensation.
FYI: Parrots almost do not have taste buds on their tongue which recognize hot taste of capsaicin.