If you are visiting Canada then in most cases you will be allowed to stay here for 6 months, unless there is a restriction on your stay. If you wish to stay longer than the authorized period then you have to request an extension of your stay by making an application well ahead of time. You must give proper reasons as to why you wish to extend your stay and how long you plan to do so for. If you forget to make an application before the expiry of your stay you can no longer make this application rather you would have to go for a restoration of status which is a more complicated process.
If you are planning to or have already applied for an inside Canada spousal sponsorship you still have to make sure that your status is valid in Canada.