Ideally, you should apply for a Canada temporary resident permit such as a work or study permit before you go into maintained status, ie. before your previous visa expires. If your temporary status has already expired, you must either seek to have it restored (and wait for it to be accepted) or leave Canada and apply for a work visa or study permit from outside the country.