Because every business transaction affects at least two accounts, our accounting system is known as a double-entry system. (You can refer to the company's chart of accounts to select the proper accounts. Accounts may be added to the chart of accounts when an appropriate account cannot be found.)
For example, when a company borrows $1,000 from a bank, the transaction will affect the company's Cash account and the company's Notes Payable account. When the company repays the bank loan, the Cash account and the Notes Payable account are also involved.
If a company buys supplies for cash, its Supplies account and its Cash account will be affected. If the company buys supplies on credit, the accounts involved are Supplies and Accounts Payable.
If a company pays the rent for the current month, Rent Expense and Cash are the two accounts involved. If a company provides a service and gives the client 30 days in which to pay, the company's Service Revenues account and Accounts Receivable are affected.
Although the system is referred to as double-entry, a transaction may involve more than two accounts. An example of a transaction that involves three accounts is a company's loan payment to its bank of $300. This transaction will involve the following accounts: Cash, Notes Payable, and Interest Expense.
(If you use accounting software you may not actually see that two or more accounts are being affected due to the user-friendly nature of the software. For example, let's say that you write a company check by means of your accounting software. Your software automatically reduces your Cash account and prompts you only for the other accounts affected.)
Source: https://www.accountingcoach.com/debits-and-credits/explanation