Apocrine glands
Human skin carries two main kinds of sweat gland. Eccrine glands are spread over almost the whole body and produce the watery sweat that cools you down. Apocrine glands are concentrated in the underarms, groin and areolae, sit deeper in the dermis, and release their secretion into the hair follicle rather than straight onto the surface.
Apocrine secretion is thicker and richer in proteins and lipids than eccrine sweat, and it is essentially odourless when it leaves the gland. The characteristic smell develops when bacteria living on the skin break those compounds down — which is why deodorants target odour-causing bacteria while antiperspirants aim to reduce sweat flow.
These glands respond to hormonal and emotional signals more than to heat. Painful recurring lumps or unusual changes in these areas are a medical matter — see a doctor or dermatologist rather than treating them as an ordinary skincare concern.