When learning accounting for the first time, the terms 'debit' and 'credit' can be a bit confusing. Why? Because when you go to the bank and deposit money, the teller will tell you, "I am crediting your account X amount of dollars," but if you are taking money our of your account, the teller will tell you, "I am debiting your account X amount of dollars." Also, with debit machines all over the place, and credit cards in everyone's pocket, the two accounting terms take on a whole new meaning.
However, what we've learned about these two words so important in the accounting world, debit and credit, have to be unlearned quickly. Why? Because in accounting, the term debit is used to describe a bank account and that money owed are actually credit accounts - the exact opposite of what we've been taught elsewhere.
In accounting terms, neither credits nor debits are 'bad', but they need to equal each other in order to balance themselves out in the end. Every itemized transaction, no matter if it's a deposit or a bill to be paid has both a debit and credit posted in the accounting world. This is what is called 'double-entry accounting' - so when you go to the bank, and the teller says, "I am crediting your account X amount of dollars," she is also debiting an entry of a similar amount without telling you this. The same goes for when the teller tells you, "I am debiting your account X amount of dollars," - the accounting will show that a credit of the same amount is being made elsewhere at the same time.
The easiest way to figure out debits and credits in accounting terms is to figure out the following: what did you receive, and where did it come from. The debit is what you received, and the credit is where you received it from, in accounting terms. So for demonstration sake, let's say you bought a CD with your credit card. The CD is what you got, so it will be a debit in the accounting world, and the credit will be applied to the liability you carry on your credit card for the exact same amount.
The bank can easily confuse people learning about credits and debits in the accounting sense of the words, especially when discussing liability. For instance, when you put money in the bank, the bank's liability to you increases, and since liabilities are credits, they are crediting your account (in accounting terms). And when the bank lowers their liability to us (by us taking money out of the bank) the banks are debiting the liability account, from an accounting perspective.
Basically it comes down to being able to figure out what you got and where exactly it came from; if you can figure these out for every transaction, then you've got the accounting terms of credit and debit down pat.