Apocrine glands are one of the two types of sweat gland that cover the human skin. Apocrine glands occur only in the armpits and about the ears, navel, nipples and genital region, and are scent glands, playing no part in the regulation of body temperature; this is left to the eccrine glands, which are more than up to the task.
Scent glands... that sounds ominous. Are the apocrine glands responsible for body odour?
Well, yes and no... the apocrine glands do deliberately produce some form of stench-laden secretion, but it's not the same as body odour. The sticky fluid they produce, usually in response to stress or sexual stimulation, contains organic substances, with a very slightly milky consistency and the normal smell of an everyday clean human being.
Where does the body odour thing come from, then? Well, although initially fresh and wholesome, these organic compounds are quickly degraded by bacteria on the surface of the skin, resulting in the well-known smell of unwashed armpits. Thank goodness for showers, eh?