Our understanding of the way in which HIV responds to highly active antiretroviral therapy (HAART) has benefited greatly from the use of mathematical models of viral dynamics and evolution. In this paper, I review the role that these models may play in the design and analysis of studies of structured treatment interruptions (STIs). STIs are being investigated in several different contexts: to reduce drug toxicities; to boost HIV-specific immune responses; and to allow reversion of drug resistance mutations in highly drug-experienced patients. I illustrate how models can help to compare the dynamics and evolution of HIV in these different scenarios, and to assess the risks and benefits of STIs.