In common law jurisdictions, you generally cannot inherent a debt.
Details vary by jurisdiction, I will use NSW, Australia as an example:
Initial ownership on death
Liabilities
Any joint liabilities (loans, credit cards etc) automatically pass to the survivor(s).
Individual liabilities are "owned" by the estate
Personal Property
Any joint assets such as bank accounts, motor vehicles, caravans, furniture etc. automatically pass to the survivor(s). If any of these are security for a loan that lien passes with the property (the loan may or may not depending on if it was a joint loan); that means that if the loan is not paid out or renegotiated the lender can seize the encumbered property. Australia has a national register of personal property security and the lien must be registered to be enforceable.
Individually owned personal assets belong to the estate.
Real Property
Any properties owned as joint tenants (which is how spouses usually own property) automatically passes to the survivor(s). If the property is mortgaged, the lien remains.
Any real property owned individually or as tenants-in-common remains owned in the same proportions with the deceased's share being part of the deceased's estate. Australia has no inheritance tax or death duties but depending on the familial relationship of the deceased to the person(s) who ultimately inherit this share, the transfer may trigger a Capital Gains Tax event and leave the beneficiaries liable for this.
Contracts
Death generally terminates a contract so unless the terms of the contract actually deal with what happens on death, the parties future rights and obligations are at an end and they just need to settle up to the date of the death.
Distribution under a will
Executor
If the deceased left a valid will then it will name an executor (or more than one). The executor is required to take charge of the estate's assets and liabilities and distribute them to the beneficiaries in accordance with the will.
Probate
Depending on the nature of the assets, it may be necessary for the executor to apply to the Supreme Court for a grant of probate. This is basically an authority from the court that allows the executor to deal with the deceased's assets. For example, banks will usually require this before they will release funds.
Advertisement
The executor must advertise the death and give any creditors or beneficiaries 30 days to come forward and make a claim. After six months, they may distribute the estate and any creditor or beneficiary who has not come forward will have no claim.
Managing the estate
The executor must settle the debts of the estate and perform any administrative tasks that need to be done, for example, lodging tax returns for the deceased (and the estate if it makes money). They are entitled to a fee for doing this, either the amount specified in the will or, if nothing is specified, a reasonable amount.
Distribution
Once all debts are settled, they can then distribute the remaining assets in accordance with the will. They are not required to liquidate them if the terms of the will can be satisfied without doing this. They can also seek the agreement of the beneficiaries on alternative means of fulfilling the will. For example, if a person's estate is to be divided between his two sons and it consists of a property worth $500k and $400k cash, an agreement for one brother to take the property and pay to the other (who gets the cash) $50k would give effect to the will.
If there are no assets, only liabilities remaining then there is nothing to distribute and the creditors have to write off their debts.
Intestate
If the deceased left no will, the procedure is essentially the same except the estate is administered by an Administrator appointed by the court (usually next of kin or the Public Trustee if no one else wants the job). In this case, there are statutory rules that are followed about who the beneficiaries are and how much they get.