Your skin has two types of sweat glands: eccrine glands and apocrine glands. Eccrine glands occur over most of your body and open directly onto the surface of your skin. Apocrine glands develop in areas abundant in hair follicles, such as your scalp, underarms and genitals. Apocrine glands secrete a fatty sweat directly into the tubule of the gland.
When you're under emotional stress, the wall of the tubule contracts and the sweat is pushed to the surface of your skin where bacteria begin breaking it down. Most often, it's the bacterial breakdown of apocrine sweat that causes a strong odor.