When you pass away, your State Pension usually stops being paid. But there are instances in which your spouse or civil partner could inherit some of your State Pension. This opportunity depends on the amount of National Insurance contributions you have both made, and when you both reach/ed State Pension age.
If you have a defined contribution pension, the value of your pot will usually be made available to your dependents and/or beneficiaries. Depending on what your specific pension provides, this could be provided as a lump sum or as a pension.
If you have a defined benefit pension, it will usually be paid as a pension to your spouse or partner if you die. Though, it may also be paid as a pension to your children until they leave full time education. It is important to note that the value of the pension provided to dependents is usually less than you would have received.