Under normal conditions, a person files a tax return for the province in which they are residing on December 31 of the taxation year. Sometimes, a person may be considered to be a resident of a province even if they have temporarily relocated to another province. This could happen if the person was employed in a temporary job, or was a student in a province where they do not normally reside.
For details: CRA IT221