There are two kinds of sweat glands: eccrine and apocrine. Eccrine glands appear all over the skin. Apocrine glands can be found where there are a lot of hair follicles, like the scalp, armpits and genitals, and they develop when a person goes through puberty.
Apocrine glands produce sweat that contains proteins and fatty acids. These acids make the sweat thicker and milky or yellow in color. That's why sweat stains on clothes can look yellow.