What are dreams, biologically?
Short answer
In terms of visual function, the low-tier primary visual cortex and high-tier frontal cortex are inactivated. The activity of the intermediate ventral stream and limbic regions are increased, apparently uncoupling low- and high-level vision processing from the system.

Background
The sleep stage where visualizations (dreaming) occur is called the rapid-eye movement (REM) sleep. 

Brain imaging studies have shown pronounced effects of REM sleep on the functioning of the visual system. 

In the awake state, the primary visual cortex (V1, or striate cortex) is activated, which is mainly concerned with low-level visual processing such as contrast perception. This cortical region in turn projects to higher-level (extrastriate) regions for more complex processing of visual information.

During REM sleep, however, a selective activation of extrastriate visual cortices is observed. Particularly the ventral processing stream is activated, which is associated with perception and recognition in the awake state (Deubel et al., 1998). Also the limbic and paralimbic regions are active (the emotional brain centers).

Interestingly, activity in the primary visual cortex (V1) is attenuated, as well as the frontal association areas of the brain. V1 is the primary, most 'primitive' visual cortex, while the frontal association areas are the highest-tier cortex that integrates complex perceptual information across perceptual modalities (Braun et al., 1998). 

Overall, this pattern suggests a model of REM sleep where visual association cortices and their paralimbic projections may operate as a closed system dissociated from the regions at either end of the visual hierarchy that mediate interactions with the external world (Braun et al., 1998).

References
- Braun et al., Science (1998); 279: 91-5
- Deubel et al., Vis Cognition (1998); 5(1/2), 81–107