After your death, your assets are used to repay your credit card debt. Then, the remaining assets are distributed to your heirs. The executor of your estate takes care of all these things.
If you have a joint account holder, they may have to bear the credit card debt burden and repay it. When you apply jointly for a credit card, both of you agree to indemnify the outstanding credit card balance.