Assets are on the left side of the accounting equation and the balances in the asset accounts are normally on the left side of the accounts. A balance on the left side of an account is referred to as a debit balance.
Liabilities and owner's equity are on the right side of the accounting equation and the balances in the liability and owner's equity accounts are normally on the right side of the accounts. Balances on the right side of an account are credit balances.
Since expenses cause a decrease to the owner's equity credit balance, a debit entry is required. However, at the time that the expense is recorded, the amount is entered as a debit in an expense account. (At the end of the year the debit balances in the expense accounts will be closed/transferred to an owner's equity capital account.)
To illustrate, let's assume that a company pays cash of $500 at the time it incurs a necessary repair expense. The reduction in the company's assets will be recorded with a $500 credit to Cash (because the asset Cash normally has a debit balance). Since every entry must have the amounts of the debits equal to the amounts of the credits, a $500 debit will be recorded in the account Repairs Expense. (A debit entry in an expense account ultimately causes the credit balance in an owner's equity capital account to decrease.)
If the company incurs the $500 repair expense but does not pay cash, the company will need to increase its liabilities. The increase to a liability account is achieved with a $500 credit. The required $500 debit will be recorded in Repairs Expense. Again, a debit is needed in the expense account in order to ultimately reduce the credit balance in an owner's equity capital account.