To answer these questions viruses have to be seen as organisms in their own right. They aren’t static but are constantly evolving, moving the goal posts and evading our immune system. Over time mutations will occur as the virus replicates, just like in any other organism, and this will lead to diversity within the population. Most of these mutations will produce less fit viruses but occasionally one or more will prove to be beneficial. One example of a mutation beneficial to a virus is if it alters the structures which are recognized by the immune system. This can happen because the immune system only recognizes small sections of a pathogen; these recognition motifs are called epitopes. If an epitope which the immune system recognizes is altered then when this new altered virus infects someone they will have to mount a whole new response from scratch and, as before, this is too slow to prevent the infection from taking hold. The flu virus mutates rapidly, producing new strains each year which the population isn’t completely immune to, and as such people can be reinfected. For this reason, year on year new flu vaccines have to be made to combat the new strain. HIV changes so rapidly that there are many circulating strains making an effective vaccine impossible to build. The selective pressure a vaccine would provide, by producing so many immune potential hosts, would exacerbate this problem as it would select for any rare variants, rapidly making itself obsolete.
One reason HIV changes so rapidly is because its genome is encoded by RNA and is copied first into DNA and then back to RNA to make more virus. The copying of RNA to make DNA is extremely error-prone which introduces more mutations than occur in many other viruses. As such many viruses which replicate in this way are extremely difficult to vaccinate against. One reasons why some viruses are easier to treat arises if the epitope recognized by the immune system happens to be crucial to the life cycle of the virus. For example, if the immune system recognizes part of an enzyme which is crucial for the replication of the viral genome then a mutation in this epitope will instantly prevent the virus from replicating and passing on the mutation.
It’s not all doom and gloom though. Although viruses are mutating and evading the memory responses our immune systems erect there is some hope on the horizon. Evolutionarily it is not in a virus’ best interest to kill its host. If someone catches influenza and dies within a day they are unlikely to pass it on to many people. If the person survives for several years without clearing the virus it can be passed on to many more people. This can be seen best by looking at myxomatosis and rabbits in Australia. The virus was carried by rabbits in Europe but had never been present in Australia. As a result when it was introduced none of the rabbits were immune and the illness ripped through the population. In fact it was such a strong virus that it killed many of the rabbits it infected. Over time rabbits were selected to be more resistant to the virus but viruses which were less virulent were also selected as their hosts survived longer to infect more rabbits. This is expected with most viruses; for example, HIV being a relatively new virus to humans is causing huge problems but already in areas of high incidence people are being born who are naturally resistant to HIV infection. Not only this but the closely related simian immunodeficiency virus (SIV) infects primates but is largely asymptomatic, showing a situation where these two organisms are coexisting peacefully.
So viruses too are evolving. Some, like HIV, are evolving so rapidly that evolution can even be observed as it occurs within a single person. This can inform vaccine design and how we see the future of a virus’ development. This is only part of the story though; the wholesale exchange of large chunks of genetic material between different strains of virus can lead to massive evolutionary jumps producing problems such as may be seen with bird flu in the near future. All of these things need to be understood if we are to even hope of combating these sometimes devastating infections, and an understanding of evolution and selection pressure plays a large part in this.