When talking about a checking account, a deposit is a credit and a withdrawal is a debit. That leads many to think a credit to mean "add to the account" and a debit to mean "take something from the account".
In accounting terms, a debit is something that increases assets or decreases liabilities, and a credit is something that does the opposite: it decreases assets or increases liabilities.
In your checking account, a deposit increases the bank's liability: it's money they must supply you if you ask for it. Likewise, a withdrawal decreases the bank's liability: it's less money that they now owe you. That is, your money is not an asset of the bank, but a liability.
On a credit card statement, every charge is actually a credit (for the bank): it increases your liability to the bank. Every refund and payment is a debit (for the bank): it decreases your liability to the bank.