The regulation of transcription of the human immunodeficiency virus (HIV) is a complex event of significant pathological relevance, which recapitulates general concepts of cellular transcription with some peculiarities. The viral promoter is embedded in a chromatin structure that exerts powerful repression on transcription; activation of gene expression relies on the combined activity of a series of cellular factors that respond to different external stimuli, and on the function of a single viral regulatory protein, the Tat transactivator. Transcriptional activation is consequent to both chromatin remodeling and to the recruitment of elongation-competent RNA polymerase II complexes onto the integrated promoter, two events that require the coordinate, but transient, assembly of different protein complexes. Application of optical imaging techniques now allows us to appreciate the spatial and temporal evolvement of these reactions in vivo. The picture that is emerging is not only descriptive, but also relevant to the understanding of the regulation of the process. In particular, it appears that the confinement of biomolecules within specific subcellular compartments represents a way to control and coordinate the assembly of functional complexes that regulate viral gene expression.