Smith & Wesson is the company I'm most familiar with. Their warranty is for one year. After that, their "Lifetime Service Policy" kicks in for firearms manufactured after a certain date. S&W is terrific about the work and, for the most part, shipping is included for repairs at no charge for firearms that have not been modified.
Other manufacturers have similar policies.
Other manufacturers have similar policies.