I can tell you how I could do it. I don't need a visa to visit Canada for up to 6 months. I could go to Canada, stay with my husband for 6 months, leave to visit home for a week, then return to Canada for another 6 months and then visit again and so on. Of course, I wouldn't be able to work in Canada, but I could still be living with my partner.
Another possibility is that the person is in Canada with a different visa. Maybe a skilled worker visa or a student visa or whatever.