How often you should replace a roof depends on the type of roof.
According to Bobsroofing.com, estimates based on different types of roofs are:
Shake/Wood Shingles: 20-25 years Composition Shingless: 12-20 years Rock Roofs: 12-15 years Metal Roofs: 50-75 years