Your principal private residence is exempt for the period of time it was your PPR.
So if you own a property as your home for 1 year and then sell it, the gain is exempt.
If you live in it for 5 years as your home and rent it for 5 years, the gain is apportioned, so only 50% of the gain is subject to CGT. ( It might be that you get a year's grace, so it could be 60% exempt)
Not sure about joint ownership. What is the exact situation you want information on? Is it the PPR of one, and an investment for the other? Or is it a couple who have split up?