There are two methods generally used to do accounting. One is the accrual method of accounting and the other is the cash basis method of accounting.
Let's compare the two starting with accrual accounting. Using the accrual method, transactions are recorded in the period in which they occur. We record revenue in the period in which it is earned, not just when cash is received. Likewise we record expenses in the period in which incurred, not just when cash is paid. This is the GAAP approved method for preparing financial statements.
For the cash basis of accounting, revenues are recorded when cash is received and expenses are recorded when cash is paid. This results in less accurate financial statements. Revenues and expenses reported in the month in which cash is received or paid might not provide investors and creditors with the best performance information about a company and likely lead to overstated or understated amounts on the balance sheet. Thus the cash basis of accounting is not GAAP approved and can not be used for any company that is required to prepare financial statements in accordance with GAAP. Usually this method is used by small businesses and hobbyists.