You sweat when your body temperature gets warm. Your body is trying to cool you down.

The key to this body temperature regulation process is your sweat glands. You have sweat glands all over the surface of your skin and in specific areas such as your scalp, armpits, and groin. When you start to warm up, your nervous system automatically stimulates these sweat glands to secrete sweat (made mostly of water, sodium chloride, trace amounts of other compounds, and urea) onto the surface of your skin. When the sweat evaporates, it cools your body.

And what causes you to sweat is usually pretty obvious – anything that causes your body temperature to increase. Some sweat triggers are obvious (e.g., a good workout), but there are some surprising causes of sweat you might not have thought of. Here's a list of some common and surprising sweat triggers and what you can do to avoid them.

Common triggers you're probably aware of:

Exercise. A good workout or any physical exertion can cause you to sweat. That's how you know you're working your muscles, right? Stay cool by drinking lots of cold water and wearing high-tech clothing made of fabric that can wick moisture away from your skin.

Warm temperature. Taking in the summer heat can feel nice, but it can also trigger sweat. If it's windy, then you may cool down faster because the sweat evaporates faster from your skin. But if it's humid, your body takes longer to cool off. To stay cool, get indoors to an air-conditioned place, take a cool shower or bath, and drink cool liquids.

Feeling certain emotions. Anger, embarrassment, fear, excitement, stress, and anxiety can all trigger your sweat glands. You may not be able to control how you feel, but you can learn to react a certain way so that your emotions are under control. For example, if you are angry a lot, you may sweat a lot, so learning to control your anger may calm you down.

Common triggers that may surprise you:

Wearing synthetic fabrics. Clothing and shoes made of synthetic materials may trap air in, causing your body to warm up. Choose clothing made of natural materials such as cotton, silk, and wool or shoes made of natural materials such as leather, to allow your skin to breathe.

Medications. Certain medications (e.g., NSAIDs or non-steroidal anti-inflammatory drugs, antidepressants, some diabetes medications) can cause sweating as a side effect. Talk to your doctor or pharmacist if this is a concern for you. Don't stop taking the medication without consulting a health care provider first.

Wearing heavy layers on cold days. Too many layers can make you hot. But here's the beauty of wearing layers: You can shed one or two to cool down.

Drinking alcohol. Alcohol can trigger sweat. Avoid alcohol altogether if you want to avoid sweating, or try to lessen the effect by alternating alcoholic drinks with non-alcoholic ones, and eating something before you drink.

Drinking hot caffeinated beverages such as coffee. The hot beverage alone can warm up your body, but caffeine can also cause sweating. Go for a decaf ice coffee if you're craving a drink.

Eating spicy foods. Avoid spicy foods, or see if there are milder versions of the same food.