The sebaceous glands are microscopic (tiny) glands in the skin which produce an oily/waxy substance, called sebum, to lubricate (oil) the skin and hair. In people, these glands are found in greatest amounts on the face and scalp, joined near the top inside hair follicles or sweat pores. However, they are in all skin areas except the palms and soles (undersides) of the feet.
There are different kinds of these glands and sebum. In the eyelids, meibomian sebaceous glands emit a special kind of sebum into tears. There are several related medical conditions, including: acne, sebaceous cysts, hyperplasia, sebaceous adenoma and sebaceous gland carcinoma (see section below: Diseases).
Washing skin or hair with plain detergent can cut the amount of sebum in oily skin. Also, water temperature over  can keep sebum melted during a wash.

Locations and morphology
As a branched kind of acinar gland, the sebaceous glands are found in people all over the skin except in the palms of the hands and soles of the feet.

Sebaceous glands are often found in hair-covered areas, where they are connected near the top of hair follicles (see image at top). The glands deposit sebum on each hair, and bring it to the skin surface along the hair shaft. The structure consisting of hair, hair follicle, arrector pili muscle, and sebaceous gland is known as a pilosebaceous unit.

Sebaceous glands are also found in non-haired areas (glabrous skin) of the eyelids, nose, penis, labia minora, and nipples. Here, the sebum travels along ducts which end inside sweat pores near the surface of the skin.

At the rim of the eyelids, meibomian glands are a specialized form of sebaceous gland. They secrete a form of sebum (known as meibum) onto the eye, which slows the drying of tears.

Sebum
Sebaceous glands produce the oily, waxy substance called sebum (Latin, meaning fat or tallow) that is made of fat (lipids), wax, and the leftover dead fat-producing cells. In the glands, sebum is produced within specialized cells and is released as these cells burst; sebaceous glands are thus classified as holocrine glands.

Sebum has no odor, but its bacterial breakdown can produce a bad odor. Sebum is the cause of some people experiencing "oily" hair,
as in hot weather or if not washed for several days. Earwax is partly composed of sebum. Sebum can be washed using plain detergent, to dissolve the waxy material in the skin. Also, water for washing should be over  to keep the sebum molten.

Excess sebum has been linked to eating red meats, fried and oily foods and some other type of foods but different research shows multiple theories about it.

Function
It is commonly believed that sebum acts to save skin from drying or to waterproof hair and skin. But some scientists have contended that "low levels of sebaceous gland activity are not correlated with dry skin", and it may serve little or no purpose in modern humans.

Composition
The substances in sebum vary between species. In people, the lipid content is as follows:

Also, sapienic acid is a sebum fatty acid that is found only in people, not in animals.

Control
The following medicines have been shown to reduce the flow of sebum from skin:
 Isotretinoin
 SMT D002
 Spironolactone (suitable for females only)

Changes during development
The sebaceous glands of a human fetus in utero secrete a substance called Vernix caseosa, a "waxy" or "cheesy" white substance covering the skin of newborn babies.

The activity of the sebaceous glands increases during puberty because of heightened levels of androgens. In males, sebaceous glands begin to appear predominantly on the penis, on the shaft and around the rim of the penile head during and after puberty. This is however normal, not to be confused with an STD.
In females, they appear predominantly in the labia minora.

Diseases
Sebaceous glands are involved in skin problems such as oily skin, acne, and keratosis pilaris. In the skin pores, sebum and keratin can create a hyperkeratotic plug called a "microcomedo" which can block a pore and cause pimples. The prescription medicine isotretinoin significantly reduces the amount of sebum produced by the sebaceous glands, and is used to treat acne.

The extreme use (up to 10 times doctor-prescribed amounts) of anabolic steroids by bodybuilders, for muscle gain can also cause acne. The sebaceous gland is stimulated due to some steroid conversion into dihydrotestosterone. This event may cause serious acne on the face, neck, chest, back and shoulders.

A blocked sebaceous gland can result in a sebaceous cyst.

A condition involving enlarged sebaceous glands is known as sebaceous hyperplasia.

Sebaceous gland carcinoma is a very uncommon and aggressive form of cancer involving the sebaceous glands; sebaceous adenoma is a more benign neoplasm of the sebaceous glands.

Sebum can also build up around body piercings.

Importance to other animals

Certain species of Demodex mites feed on sebum and are commonly found in the sebaceous glands of mammals, including those of humans.

The preputial glands of mice and rats are large modified sebaceous glands that produce pheromones.

Additional images

References

Other websites
 Histology at Boston University: 08801loa - "Integument: scalp".
 MeSH name: Sebaceous+Glands.

Glands
Integumentary system