Sebum is an oily secretion produced by the skin's sebaceous glands, composed of triglycerides, wax esters, squalene and free fatty acids. It reaches the surface via hair follicles and forms a thin film together with sweat.
Sebum lubricates the surface, slightly slows water evaporation and contributes to the skin's mildly acidic surface environment (the acid mantle). It is not inherently "bad" — it is part of the skin's natural system.
Production varies by genetics, hormones, age and season. Importantly, sebum and hydration are different things: even oily skin can be dehydrated. So barrier-supported, lightweight moisturising matters for oily skin too.