Available for sale (AFS) is an accounting term used to classify financial assets.
The IFRS also includes a fourth classification: loans and receivables.
As such, the gains and losses resulting from marking AFS investments to market (revaluing them to market price / fair value each period) are not included in Net Income (unlike the gains and losses associated with "trading" investments) but are reflected in Other Comprehensive Income (income statement / retained earnings) and Accumulated Other Comprehensive Income (balance sheet) until they are realized (sold).
If the asset is impaired, sold or otherwise disposed of, the revaluation gain or loss implicit in the transaction is recognised as an income or expense.
Starting in 2018, this treatment will be overridden by IFRS 9, according to which, for equity instruments, the revaluation gain or loss will be recognized under Other Comprehensive Income whether it be due to normal market fluctuations or impairment.