Private Residence Relief (PPR) normally provides an exemption from Capital Gains Tax if you have one home and you've lived in it as your main home for all the time you've owned it. You don't need to do anything when you sell it as you'll automatically get the PPR. No need to tell HMRC or include any details on your Tax Return.
However if you are getting married or entering into a civil partnership, and you both own separate properties which you intend to continue to occupy for some periods after your marriage, you need to nominate one of them as your main home within two years of your marriage/civil partnership.
Once married, you can have only one main home between you for tax purposes. So nominate the one that is likely to make the best use of your PPR exemption, otherwise HMRC will designate the property that you occupy the most as your main residence.
Having decided which property you want to nominate you need to write to HMRC at:
Capital Gains Tax Queries
HM Revenue and Customs
Indicate the date from which you want the election to apply and don't forget to include the address of the property. All owners of the property must sign the letter.