How do viruses mutate?

Viruses change all the time. That's because they copy themselves to reproduce. Think of our cells as having their own xerox machines, which the virus takes over for its own purposes. When a virus makes a copy, sometimes a random change can occur in the copy's DNA -- the double spiral-shaped molecule which acts as a manual telling our bodies how to develop and function. If enough of these changes happen over time, a new variation or strain of a virus can emerge. 

Mutations happen in two main ways. In the first, small copying errors in the virus lead to changes in the virus' surface proteins, which sit on the outside of the virus. These proteins look to attach to your cells (much like boats seeking to tie to a dock). These changes result in more closely related virus variations, like the new Covid-19 variants.

In the other way, two variations infect the same cell in a person's body and combine to form a new or "novel" virus. This often happens when a variation that only infects animals comes into contact with a human variation. This version of mutation could have created the novel coronavirus which causes Covid-19.

Our immune systems respond differently to different virus variations, and so do vaccines.

Related Questions
Have vaccine side effects resulted in any deaths?
Reports of life-threatening reactions resulting from the side effects of Pfizer-BioNTech, Moderna, and Johnson & Johnson vaccines are extremely rare. Still, it's important to address any concerns people may have.
Can groups, businesses, or organizations require that I get vaccinated?
The right to require Covid-19 vaccination in places of business, entertainment, and education ultimately depends on state or local law. So be sure to check requirements specific to your area.
Are Covid-19 vaccines safe for children?
The FDA has authorized the use of Pfizer-BioNTech's vaccine for children 12 years and older. FDA’s authorization was based on data showing the vaccine is safe and effective in this age group. Pfizer-BioNTech's vaccine has been through extremely tough safety tests, which includes continuing scientific studies in children and teenagers.