@sandyvu 1509 you can still apply for a study permit if you are here as a visitor, it is possible. The processing office you will be sending the form to will be outside of canada, i believe it is somewhere in the states but you can still apply for this, i hear sometimes they may call you to come for an interview.
@7887 did you get a letter from immigration stating you had to restore your status or you assumed you have 90 days to restore? Normally immigration states you need to apply for a new permit before your current one expires. If you want to change from visitor to sudent, you need to send your application as soon as possible with the links people have stated below. You will pay $200 for restoration of status and $150 for the student visa. You will see on the restoration form you tick what you applying to change your status to , you will tick student and then they will process the restoration first to make sure you did not violate the 90 days then it gets passed on to study permit department. Keep in mind with study permits you have to show you have the funds for the full year for your studies and I would advise you apply asap cause it can take 5 months to get a response back from immigration.
Hope this helps.