When you die your debts become a debt of your estate, generally speaking. There are some debts that terminate on death (federal student loans that aren’t guaranteed by someone else, for example), but most debts need to be dealt with by your executor.
Your executor has a duty to dispose of your debts with the assets of your estate as directed in your will. Having an effective Estate Plan can allow you to determine which assets should be liquidated first to pay the debts, allowing you to direct specific assets to specific beneficiaries if you choose. If you die without a will, your personal representative (same as executor, just a different title because they’re not appointed in a will) will have their choice of how to liquidate your assets and pay your debts. Most likely, they’ll just sell the assets that are easiest to sell or that will net a return large enough to pay the debt, even if the assets have sentiment to your beneficiaries.
If your estate has more assets than debts, the executor or personal representative will pay your debts and distribute the remainder of the estate to your beneficiaries. If your debts outweigh your assets, the assets will be liquidated to pay as much of the debt as possible and the remainder will die with you.
Things can become a little more complicated when you have jointly held debts or guaranteed debts (to be continued).