When you purchase items, you record the payment for the items on bills. When you enter information on bills, QuickBooks performs various accounting procedures in the background.
Fill out a bill recording your purchase of an item, and QuickBooks immediately debits the expense related to the item or, if you track inventory in QuickBooks, the inventory account is debited and your liability account (Accounts Payable) is credited. Later, when you pay the bill, QuickBooks debits Accounts Payable, removing the amount of the purchase from that account, and credits Cash (or Checking, or however you refer to your bank account), reducing the balance in your bank account by the amount of the purchase.
So, in the following example, the accounts that are affected when you make a $500 purchase of items for inventory are as follows:
When you pay the bill, these accounts are affected: