When you eat a chili, your tongue isn't "tasting" a flavor. Instead, it's being tricked into thinking it is literally on fire!

If you ask someone what the five basic tastes are, they might say: sweet, sour, salty, bitter, and umami. You'll notice that "spicy" isn't on that list. That's because your taste buds don't actually recognize spice - your pain sensors do!
Chili peppers contain a special chemical called "capsaicin." When you take a bite, this chemical searches for a specific sensor on your tongue called the TRPV1 receptor. Normally, this sensor's job is to tell your brain, "Ouch! This food is physically hot or burning!" Even though the chili isn't actually hot like boiling water, capsaicin tricks the sensor into sending a "fire!" alarm to your brain.
Because your brain thinks your mouth is literally on fire, it tries to cool you down. This is why your face turns red, your nose starts to run, and you begin to sweat. It's your body's emergency cooling system working to put out a fire that isn't really there.
If spiciness is just pain, why do so many people love it? When your brain feels pain, it releases "happy chemicals" called endorphins and dopamine to help you feel better. For many people, this creates a rush of excitement or pleasure after the initial burn. So, eating spicy food is basically a safe way to enjoy a little bit of "thrilling pain."
Spiciness is a pain signal, not a flavor. A chemical in peppers tricks your brain into thinking your mouth is burning. Your body reacts by sweating to cool down, but your brain also rewards you with happy chemicals, which is why spicy food can be so addictive!