Final answer:
Sebaceous glands are closely associated with hair follicles and are responsible for secreting sebum that moisturizes and protects the hair and skin.
Step-by-step explanation:
Sebaceous glands are associated with hair follicles. They secrete an oily substance known as sebum into the hair follicles, which then makes its way to the skin surface. Sebum serves multiple functions such as waterproofing and moisturizing the hair and skin, and it possesses antibacterial properties that help inhibit the growth of microorganisms on the skin. Hair follicles originate in the dermis, even though much of their structure consists of epidermal tissue, and are responsible for hair growth. Each hair follicle at its base is accompanied by a sebaceous gland, which contributes to maintaining the health and integrity of the hair and skin.