A Temporary Resident Permit may be issued to individuals who are inadmissible to Canada but their circumstances to visit Canada can be justified.
How long can you stay in Canada?
A temporary resident permit is valid for the length of your visit to Canada. For example, if you're visiting Canada for a week-long conference, your permit's validity will be a week-long only. Hence, you must either leave Canada by the expiry date of your permit or apply for a new permit before the original permit expires.
Note that an officer may cancel the temporary resident permit at any time.
Unless you are specifically approved to leave and re-enter Canada, your temporary resident permit will become invalid once you leave the country.