There are myriad factors at play when someone dies and has outstanding credit card debt. The biggest factor to consider is whom the credit card actually belongs to, as this is a major determinant. If the credit card debt is the sole ownership of the deceased, then the situation is fairly simple.
A sole owner of a credit card debt will wind up paying off all debts through probate law, which means that their estate will liquidate its assets, and pay off all debts if possible. If the estate is rather destitute, then it is up to the laws of the state or province to dictate how the estate is divvied up, before any heirs see the will executed.
In the case where the deceased owes lots of money, and did not have the resources to pay these debts off in their entirety, then the credit card company may have to endure this as a loss. A credit card company cannot go after the money from another source if none were listed on the account.
A co-signer will wind up paying the debt if the credit card had another name on it. While this may seem unfair to the co-signer, it is one of the drawbacks of lending your name to another in matters financial. This is often the case where spouses are involved. Many spouses have joint accounts, which renders them responsible for paying off the credit card debts of the deceased.
Credit card debt does not go away when someone dies, although the account is frozen while the matter is resolved. Once a person dies, their credit card accounts (once the credit card conglomerates are notified) are put on hold, no longer accruing interest at ridiculous rates, until the estate gets settled, however long that may take. All in all, the credit card companies will likely get paid, or will at least receive back a portion of their monies owing.
The debts that a person takes on merely transfer over to a loved one if the person had an estate at all. These debts can drastically alter the inheritance of children and spouses, but such is the lot when large debts are incurred. This is done primarily so that a person cannot rack up scads of debt knowing that they are on the verge of death. If this were common practice, the credit card companies would have to charge even more money in interest charges in order to offset these extreme cases.
The main thing to keep in mind when a loved one dies is that the credit card companies need to be contacted as soon as possible so that the account can be closed until the estate becomes settled according to local laws.