Hi wenwenwen13, I've got you covered on this one too....
This happened to me when I was waiting for my PNP nomination - my work permit expired and I wanted to stay in Canada while I waited to hear from them. What you need to do is complete an
Application to Change Conditions or Extend Your Stay in Canada as a Visitor.
What you need to consider is that you can only have one type of status at once. So if you apply for a visitor visa before your work permit expires and it's approved, then that's it - you no longer have a work permit and you must stop working immediately. To avoid this, you should leave the visitor application until just before the end date of your work permit so that you don't waste any days of work opportunity.
This is where the implied status comes in to it. All you are required to do in order to avoid being "out of status" is have an application
pending when your work permit expires. This means that if CIC have acknowledged receipt of your new application, your status in Canada is "implied" and you are allowed to remain until they make a decision. You will have to stop work immediately (obviously), and you will also not be able to leave Canada and return again until your new status is properly determined.
Assuming your visitor visa application is approved, you will first find out about it online and then they will mail you your new document. There is no need to flagpoll at the border to activate it.