Traditionally when you sell your home, assuming this is your principal residence, when you elect this on your income tax return in the year of the sale there will be no taxes on the capital gain.
However, if you own several properties this is where it becomes to get a little more complicated. For example with the recent boom in the housing market in Toronto families are buying multiple homes whether it be for their children currently studying at university or when they finish school and begin a new job in the downtown core. This among many other factors (super low interest rates) has created an increase in demand for condos in the GTA.
When the owner's of the second properties for family members sell their properties this triggers a capital gain, and if not filed correctly using the principal residence exemption you'll be sure to get a letter from CRA stating that the gain represents a flip of property to earn business income, which is clearly not the case.
CRA has caught on to the fact many investors have flipped condos in the past few years, and rightly so they should be paying taxes at the business income rate, however they also seem to be lumping in the family second home situations in this category as well.
To prevent this issue, ensure you elect your second family property as principal residence in the year you sell.