Short answer. Yes. Your roof is part of the dwelling, so homeowners insurance covers it against sudden covered events such as wind, hail, fire, lightning and falling trees. It does not cover wear, age or poor maintenance, and how much a claim pays depends on whether your roof is insured at replacement cost or a depreciated value.
What parts of the roof are covered
The whole roof system is part of Coverage A, the dwelling: shingles or metal, underlayment, decking, flashing, vents, pipe boots, ridge cap, drip edge, skylights and gutters. A detached garage or shed roof falls under Coverage B, other structures.
Covered perils
Most homeowners policies cover the roof against fire, lightning, windstorm, hail, the weight of ice and snow, falling objects such as trees, and vehicle impact. Each policy lists its perils and exclusions.
Common exclusions
Wear and tear, deterioration and age.
Faulty installation or defective materials.
Damage from repeated leaking over time.
Damage from animals, birds and insects.
Cosmetic damage, if your policy has that endorsement.
Terms that change the payout
Replacement cost or actual cash value: see ACV vs RCV.
Roof payment schedule: pays a percentage that shrinks with roof age.
Wind and hail deductible: often a percentage of the dwelling limit.
Ordinance or law: pays for code-required upgrades.
The practical test
Ask two questions: did a specific event damage the roof, and when? If you can answer both with photos and a date, you likely have a claim. If the honest answer is that the roof is just old, it is a planned replacement. See does homeowners insurance cover roof replacement and wear and tear vs hail damage.