In cash accounting system transactions are recorded when the movement of cash takes place (paid or received). However in accruals accounting, the transaction is recorded when actual event takes place. In other words, in accruals accounting, the revenue is recognised when earned and the expenses when incurred.
For example, if a company pays the June electricity in July. In cash accounting this bill will be recorded in July (when payment is made) while in accrual system this bill will be recorded in June ( When electricity is consumed).