They’re responsible for paying the rent. But you have rights to continue to live in the property during the tenancy, and while you’re still married or in a civil partnership.
In England, Wales and Northern Ireland, these are called ‘home rights’.
In Scotland, you have similar rights to a ‘non-entitled spouse’ or ‘non-entitled civil partner’.
If your ex-partner moves out, you might be able to take over paying the rent. In England and Wales this is something you have the right to do. But in Scotland and Northern Ireland, it will depend on the tenancy agreement.
Your ex-partner might also be able to transfer or sign the tenancy over to you.