How long is a new drug protected by patent laws after the patent is issued?

TRIPS agreement (applies to drugs after 1989) gives 20 year protection. Prior to that it was 16 years.
In many jurisdictions, pharmaceutical patents are elegible for patent term extension. For example, in USA, a patentee can get an extension of up to 5 years for a specific product o process (not the full scope of a claim) beyond the 20 year term for an FDA approved product. Variations on such extensions exist in many but not all jurisdictions.