What does all this have to do with drug resistance? The answer is that HIV isn't perfect: While HIV is furiously reproducing, there are bound to be errors. Picture infected CD4 cells as poorly run bug factories that are supposed to make two-eyed blue bugs. Because the factories produce more than a billion of these bugs daily, some bugs won't quite turn out like they're supposed to. Most have two eyes, but some have three. Some are pink and some have spots. The bugs that are different are called "mutants." The changes are called "mutations."
HIV mutations occur naturally all the time in everyone with HIV, whether or not they are taking medications. If you didn't need medications to treat HIV, mutations wouldn't matter that much, since mutations generally don't make the virus more aggressive.
But, as you'll see later on, mutations matter because eventually almost everyone with HIV needs treatment. Certain mutations can enable HIV to thrive despite the presence of medications in your body.