If a person dies owing a balance on their credit card, the credit card company will collect the debt from the cardholder's estate. If the cardholder does not have sufficient assets to cover the debt, the credit card company is generally out of luck. In some circumstances, the credit card company will approach relatives of the deceased and ask them to pay the debt but that practice is rare and the relative has no obligation to pay the outstanding debt.
However, if the account was opened as a joint account, the other account holder will be liable for the debt but this is only the case when the other person is a part of the credit card contract. If the other person using the card is merely an authorized user (but not a joint credit applicant) then they are not responsible for the debt. Along those lines, if you are an authorized user of a card and the account holder dies, the account will be closed and you will have no further access to the credit line. This may seem pretty straightforward but many people think that they can simply transfer the account to their own name. Instead, that person will have to apply (and qualify) for credit based on their own circumstances.