A simple response to the title of this post would be "50 years of course", but that doesn't reflect the complex realities of roofing materials, installation, and mother nature. Depending on these factors, you might need to make repairs less than ten years after the "birth" of your roof. That's not likely but can happen if your home or business has the misfortune of being hit by gale force winds, an unbelievably bad hailstorm, or if the roof wasn't properly installed. If none of those factors apply, then your roof will probably be good for decades.
Whether or not a roof can be simply repaired (or needs to be replaced) may also depend upon damage to support structures or substrate materials. However, even if support material need to be replaced, as long as roof tiles are handled with care, you might be able to reuse them and thus lower the overall repair costs. Speaking of costs, this should determine whether or not the roof should just be replaced instead of repaired. For example, if it's going to cost just as much to repair the roof over the course of ten years, it would be more cost-effective to replace the roof with newer, better materials such as polymer roof tiles that will last much longer and increase the overall value of the structure.