Final answer:
Sebaceous glands produce sebum that waterproofs the skin and hair and acts as a barrier against bacteria.
Step-by-step explanation:
Sebaceous glands produce an oily substance called sebum. Sebum is secreted into hair follicles and makes its way to the skin surface. It waterproofs the hair and skin and helps prevent them from drying out. Sebum also has antibacterial properties, so it inhibits the growth of microorganisms on the skin.