Understanding Accounting: The Short Version
Rule 1: The terms "debit" and "credit" are only there to confuse. Most of the time they mean the opposite of what they should: An increase in assets is a debit, a decrease in assets (or an increase in liabilities) a credit. Equity–the net value of the firm to its stockholders–is an exception to that rule. A credit to equity is an increase, a debit a decrease. For closely related reasons, the income account is another exception: Revenue is a credit, expense a debit.
Rule 2: The essence of double entry bookkeeping is that every item appears twice, once on the left hand side of a T account, once on the right. If you buy some oil, that is a reduction in (credit to!) cash and an increase in (debit to!) inventory; the two amounts are equal because accountants measure the value of something, in this case oil, by what you paid for it. If someone gives you money, that is an increase in (debit to!) cash and a matching increase in (credit to) equity. Similarly, if you sell the oil for more than you paid for it the difference ends up in equity, although only after going through an extra pair of T accounts (income/expenses) intended to make sure that the transaction shows up on the income accounts as well as the firm's balance sheet.
Rule 3: The reason the left hand (debit) side of a T account is good if it shows assets or liabilities but bad if it shows equity or income is that an increase in assets can be balanced either by an increase in liabilities (you took out a loan, giving you cash, an asset; the money you owe is a liability) or by an increase in equity (you bought low and sold high, increasing cash without increasing liabilities, hence increasing equity). An increase in liabilities is bad, an increase in equity is good--but either can balance an increase in assets, so they have to be on the same (credit) side of a T account.
Rule 3': The reason liabilities are like equity is that equity is a "liability" the firm owes to its stockholders. This is shorter than Rule 3 but less enlightening.
Rule 4: When an item doesn't show up where you think it should in the accounts, the reason is that it is being shifted forward or backward in time in order to group expenses with the income they produce.
Read the rules three times, think about them, and with luck you will understand accounting considerably better than I did a week ago.