If a letter to leave Canada is received then the person who has received such letter must leave Canada no later than the date mentioned in the letter (normally 30 days). It will automatically become a Removal(Deportation) Order if the person, who has received such letter, fails to comply.
Once a sponsorship application (inland) is submitted, it does give the sponsored person an implied status to remain in Canada, but I am not sure what happens if the sponsorship application is submitted after receipt of letter to leave, I think you can still stay in Canada but will need to apply for Restoration of status.