Basically, there are two basis of accounting. One is cash basis and another is accrual basis of accounting.
In cash basis of accounting, an expense or an income is recognised in books of accounts only when there is a real flow ie outflow or inflow of cash. CB of accounting is usually followed by people who run small businesses.
Accrual concept of accounting requires that an expense or an income must be recognized in the accounting period to which they relate to,rather than on the period in which there is cash outflow/inflow.
When a company follows accrual basis of accounting, expense is recognised when they have been incurred, even if the payment is yet to be made.
Similarly, revenue is recorded when they are earned, even if payment is not yet received.
When is it said, that an expense is incurred?
When the goods have been received by the company from the vendor or the service has been rendered to company by the service provider, the expense is said to have accrued.
When is it said, that a revenue is accrued or earned?
Revenue is said to be accrued, when goods are sold to the customer or service is provided to the client and significant risk or reward of ownership is transferred to the buyer.