A deferred revenue is reported by a company when it has received money prior to earning it. The company will report the cash as its asset and will report its liability, deferred revenue. The liability will go away when it becomes earned and gets reported as revenue.
An accrued revenue is reported by a company when it has earned the revenue but has not yet recorded the revenue or the receivable. An adjusting entry is made at the end of an accounting period so that the financial statements will report this earned revenue and its receivable.
A deferred expense is reported when a company has paid money, but has not yet incurred the expense. (Prepaid insurance is an example.) The company reports the prepayment as an asset, until the cost expires or is used up.
An accrued expense is a reported by a company when it has incurred an expense, but has not yet recorded a payment or other document. An adjusting entry is made to debit the expense and to credit a liability account.
Deferrals and accruals both require adjusting entries.
AccountingCoach.com has an explanation and drills on this topic.