An account is fundamentally either an asset or a liability. When you buy something with a credit card, you've incurred a liability, and gained an asset, no matter what you've purchased. If you use a debit card or cash, you're trading one asset for another.
One of the basic asset categories is expenses. That's the confusing part! When you acquire an asset, which is consumed or otherwise has no book value, that's an expense.
So when you buy groceries with a debit card for a hundred bucks, that's a +100 in Expenses:Groceries, and a -100 in Assets:Checking. If you buy the same groceries with a credit card, it's +100 in Expenses:Groceries, and -100 in Liabilities:CreditCard. When you pay off the credit card, that's -100 Assets:Checking, and +100 in Liabilities:CreditCard.
Asset is overloaded here, because Expenses are not included in calculating net assets. It's confusing! I find it even more confusing that Income is a liability, which always gets lower. That's because whoever paid you had a liability to do so, which they met out of assets.
This is also why, when you pull a CSV of a checking account, purchases are positive numbers, and income is negative. A CSV of a credit card will have purchases as negative, and payments as positive. It's the difference between an asset account and a liability account. Again, not to be confused with net liabilities: Income is a liability, but not one you owe anyone, rather the contrary, Income just gets smaller and smaller (ideally! If it isn't getting smaller then your net assets will be shrinking, most of us can't afford that for long).
The main thing is that an account which fluctuates from zero to positive, or accumulates, is an asset account. One which fluctuates from zero to negative, or accumulates negatively, is a liability account. There are times when this matters, notably when you can take a tax deduction for expenses, that's a good example of why they're on the asset side of the books.