If you want to apply for a student visa, you must apply through the visa office responsible for your home country. You cannot send the application from within Canada. Note that you will have to send your passport for visa stamping to your home country visa office and if an interview is required - it will be held outside of Canada as well.
As part of the application process, you will have to prove that you have strong ties to your home country and no plans to remain in Canada long term. This may be difficult to do if you are already here on an extended visit.