If you have an HSA, you should have been required to list a beneficiary when you opened the account. If you die before the account is depleted, whether or not the money is taxable to the beneficiary depends upon who is named.
If your spouse is beneficiary, it is handled similar to an IRA. The surviving spouse may take over the account. It will continue to grow tax deferred and may continue to be used for medical expenses.
If the beneficiary is not your spouse, the money is distributed and may be taxable. If no beneficiary designation is on the application, it is distributed per your estate documents.
If you do have an HSA account, please check your beneficiary designation and see that it is compatible with your estate plans.