If your original work permit was subject to a requirement such as a Labour Market Opinion Confirmation or CAQ, then such processes may need to be concluded prior to (or in some cases in parralel to) the extension or renewal of the work permit.
Yes, it is typically possible to apply for an extension of an existing work permit. Such applications are submitted to a Case Processing Centre located within Canada, and the applicant is not required to leave Canada during the application process.
In some cases, there may be a maximum possible validity of a work permit under a given set of provisions. For example, in cases of intra-company transfer, an individual may remain working in Canada for a maximum duration of between five and seven years (depending on category); for low skill occupations subject to a Labour Market Opinion, a maximum duration of four years may apply.
At present, it is advisable to apply a minimum of 30-60 days prior to the expiration of your work permit, which represents the current delays for processing of such cases. Although not advisable, it is possible to apply closer to the expiration of a work permit.
The immigration status of an applicant remains intact for the duration of the processing of the application and until a decision is received (referred to as implied status), even if the original work permit otherwise expires. It is important to note, however, that departure from Canada after the expiration of a work permit can still result in a failure to receive admission when seeking to return. Also if re-admitted following the expiration of the work permit, but before issuance of the renewed work permit, then implied status may no longer apply.