One of the hallmarks of HIV infection is the rapid development of a genetically complex population (quasispecies) from an initially limited number of infectious particles. Genetic diversity remains one of the major obstacles to eradication of HIV. The viral quasispecies can respond rapidly to selective pressures, such as that imposed by the immune system and antiretroviral therapy, and frustrates vaccine design efforts. Two unique features of retroviral replication are responsible for the unprecedented variation generated during infection. First, mutations are frequently introduced into the viral genome by the error prone viral reverse transcriptase and through the actions of host cellular factors, such as the APOBEC family of nucleic acid editing enzymes. Second, the HIV reverse transcriptase can utilize both copies of the co-packaged viral genome in a process termed retroviral recombination. When the co-packaged viral genomes are genetically different, retroviral recombination can lead to the shuffling of mutations between viral genomes in the quasispecies. This review outlines the stages of the retroviral life cycle where genetic variation is introduced, focusing on the principal mechanisms of mutation and recombination. Understanding the mechanistic origin of genetic diversity is essential to combating HIV.