An ISA is an individual savings account and so it's not like a joint account that's automatically transferred to a spouse.
If it's your ISA and you pass away, the ISA becomes what's called a 'continuing ISA'. This means it will remain open for three years and one day from the date of death. The reason for that is to ensure there's time for either the administration of your estate to be completed, or for the ISA to be closed by your executor. If neither of these happens within the timeframe, the ISA provider will close it.
Before the ISA is closed, it will continue to grow and keep the tax benefits that an ISA brings. Although additional funds cannot be added to the ISA, additional growth or returns will not be subject to income tax and capital gains tax.
However, ISAs form part of your estate, so they are subject to inheritance tax. If your estate is worth more than the current inheritance tax limit of £325,000 and you leave your ISA to anyone other than your spouse or civil partner, they'll pay inheritance tax. (Spouses or civil partners are not required to pay inheritance tax.)
In addition, upon your passing, your spouse or civil partner will inherit a one-off additional ISA allowance. This is called the 'Additional Permitted Subscription' (APS) and is equal to either the value of your ISA at the date of death, or when it's closed (whichever is higher), but it will not affect your spouse or civil partner's own ISA allowance.
Introduced in April 2018, the APS means that if, for example, you left an ISA worth £25,000, your partner would have the £20,000 ISA allowance that's open to everyone for the 2020/2021 tax year, as well as an additional permitted subscription of £25,000. This additional ISA allowance can be used even if the money is left for someone else to inherit, such as a relative that isn't your spouse or civil partner.