In accounting, "debit" and "credit" are opposite forms of the same function, like addition and subtraction. This gets tricky, though, because a debit isn't strictly an increase or a decrease on an account, nor is a credit. It depends on the type of account. Some accounts are increased by debits. Others are increased by credits. Remember which is which and you'll go a long way to understanding how debits and credits work.
Debit and Credit in Common Usage
Outside of the accounting world, the term "debit" usually refers to money removed from a consumer bank account, such as money removed from your checking account when you buy groceries. Similarly, "credit" usually refers to money added to a consumer bank account account, or to money that is otherwise freely yours to spend, as in a store credit, or borrow, as in a loan. The term "credit card" derives from this concept, since a credit card gives you access to money that isn't yours but which you have the privilege to spend so long as you pay it back in a timely fashion.
Accounts Increased by Debit
Debits increase asset accounts, expense accounts, loss accounts and dividend accounts. For example, the money in your checking account is an asset. When you deposit your paycheck into the account, that is a debit on your asset account because it increases your assets. An example of an expense is the babysitter. When you pay the babysitter, that is a debit on your expense account because it increases your expenses. Conversely, a credit would decrease any of these accounts. These accounts tend to run a debit balance, meaning that the ledger will show more debits than credits if you add them all up.
Accounts Increased by Credit
Credits increase income accounts, revenue accounts, liability accounts, equity accounts and gains accounts. For instance, the bills you owe are a liability. When a bill comes in and you record it in your books, you would mark it as a credit on your liabilities account because the bill increases your liability. On the other hand, when somebody else pays you, and you earn income, you would record that as a credit in your income account ledger, because receiving a payment increases income. Conversely, a debit would decrease any of these accounts. These kinds of accounts tend to run a credit balance.
Accounting for All Those Accounts
You might be wondering about the difference between a debit on an asset account from depositing a paycheck, and a credit on an income account from depositing that same paycheck. At home, it makes sense to question that redundancy. You wouldn't normally need all these different types of accounts. However, in business, it becomes more and more important to make these distinctions. You can't just have one general ledger and keep track of everything only on that, because it would grow far too messy and prone to error. Instead, it makes sense to set up different types of accounts so that you can classify related transactions together. The general ledger would then be limited to serving the role of making sure that all your different accounts balance.