Cerebral edema refers to the abnormal accumulation of fluid in brain tissue. As such, it generally presents as hyperintense on T2/FLAIR sequences.
Cerebral edema can occur in many pathologies, including cerebral tumors, abscesses, infarcts, etc., and is often divided into two main categories: cytotoxic and vasogenic edema.
Cytotoxic Edema
Cytotoxic edema occurs in situations where the blood brain barrier is intact.
Edema results from shifts of fluid into cells, most often as a result of membrane pump failures following cell death in the case of ischemia or infarcts.
This leads to edema with restriction of water diffusion. As such, cytotoxic edema will appear hyperintense on both T2/FLAIR and on DWI.
This type of edema is most commonly seen in strokes or ischemic syndromes.

Figure 1: Right MCA stroke on T1. Red arrow illustrating blood flow disruption and territory ischemic infarct.

Figure 2: Right MCA stroke on FLAIR. Blue arrow illustrating hyperintense area in the cortex consistent with cytotoxic edema.

Figure 3: Right MCA stroke on DWI. Area of fluid restriction appears hyperintense on scan.
Vasogenic edema
Contrary to cytotoxic edema, vasogenic edema occurs in situations where the blood brain barriers is disrupted.
Edema is extracellular and usually results from fluid leakage out the capillaries into the surrounding white matter.
This shows up as edema without diffusion restriction.
As such, vasogenic edema will appear hyperintense on T2/FLAIR but attenuated (hypointense) on DWI.
Vasogenic edema can be caused by many pathologies. Most commonly, it can be found surrounding intra-axial tumors, cerebral abscesses or even around maturing hemorrhages.
If the edema is extensive and bilateral, it might be secondary to posterior reversible encephalopathy syndrome.

Figure 4: Cystic lung metastasis on T1 with gadolinium contrast. Note the homogenous low (fluid-like) intensity of the mass and the hyperintense rim surrounding the mass (ring enhancement).

Figure 5: Cystic lung metastasis on T2. Note the extensive edema appearing as hyperintense parenchyma surrounding the mass. The cystic mass also appears hyperintense given that it is fluid filled.

Figure 6: Cystic lung metastasis on DWI. Notice how, contrary to the case of cytotoxic edema seen earlier, vasogenic edema does not come with fluid restriction and therefore there is no hyperintensity on DWI.
More about cytotoxic edema.
More about vasogenic edema.