Bike warranties commonly work in layers rather than one blanket promise: the frame itself often carries the longest coverage against manufacturing defects, while components — gears, brakes, suspension — usually carry shorter, manufacturer-specific terms.
What a warranty typically covers is a genuine manufacturing fault: a weld failing under normal use, a component that breaks well before its expected lifespan under ordinary conditions. What it typically does not cover is wear and tear — a worn brake pad, a stretched chain, a punctured tyre — since those are expected outcomes of normal riding, not defects.
The actual terms differ by manufacturer and even by component, so the specifics on any bike are whatever that brand's own documentation states — worth checking (and keeping) at the time of purchase, since a warranty claim later usually needs the original proof of purchase.