Final answer:
Sebaceous glands produce sebum that lubricates and softens hair and skin, while sweat glands produce sweat, which contains excess water, salts, and waste products.
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.
Sweat glands produce the salty fluid called sweat, which contains excess water, salts, and other waste products. The glands have ducts that pass through the epidermis and open to the surface through pores in the skin.