We use a cellular automata model to study the evolution of human immunodefi
ciency virus (HIV) infection and the onset of acquired immunodeficiency syn
drome (AIDS). The model takes into account the global features of the immun
e response to any pathogen, the fast mutation rate of the HIV, and a fair a
mount of spatial localization, which may occur in the lymph nodes. Our resu
lts reproduce the three-phase pattern observed in T cell and virus counts o
f infected patients, namely, the primary response, the clinical latency per
iod, and the onset of AIDS. The dynamics of real experimental data is relat
ed to the transient behavior of our model and not to its steady state. We h
ave also found that the infected cells organize themselves into spatial str
uctures, which are responsible for the decrease on the concentration of uni
nfected cells, leading to AIDS.