HIV resistance to antiretroviral agents is a major contributory cause of treatment failure. The dynamics of HIV replication, together with patient-, physician-, and drug-related factors, lead to emergence of HIV resistant strains in most of the patients. Phenotypic assays look for an increase in the antiretroviral drug (ARV) concentration that inhibits 50% of the growth of the tested HIV strain (IC50), comparatively with a reference strain cultivated in parallel. Genotypic tests detect resistance mutations in the reverse transcriptase and protease genes by comparing the gene sequences of a resistant virus to those of a wild-type strain that has previously been described. The efficacy of each ARV class and each individual ARV is threatened by specific mutations and resistance mechanisms. In retrospective studies of genotypic or phenotypic resistance testing, baseline resistance tests results were correlated with virological outcomes. There is some evidence from prospective studies that resistance testing may have some benefits when used to choose salvage regimens. However, problems in the areas of test interpretation, patient compliance, availability of active drugs, and technical test performance limit the usefulness of resistance testing in clinical practice. This article reviews the mechanisms underlying HIV resistance, the principles of phenotypic and genotypic tests, and the use of these tests in clinical practice.