We posted a few days ago about the proliferation of the way we're causing the evolution of genetically altered pathogens that are resistant to antibiotics. That's because we slam them with exposure to lethal agents, rapidly removing all but the few, or very, very few bacteria (or viral particles) that are resistant, leaving them an open field for competition-free access to resources and hence rapid reproduction.
We have an 'adaptive' immune system that generates clones of white blood cells or antibody molecules they produce. Because of a particular way in which the chromosome region that codes for these antibodies is scrambled to produce the antibody protein, we generate millions of random antibody structures. This is thought to be a way of avoiding the need to evolve pathogen-specific antibodies. If we make countless different antibody molecules, the odds are that at least one will be able to grab onto some part of any bacterial cell or virus that we may chance upon. We don't have to know what it will be ahead of time. Once we recognize it, the lineages of white cells that recognize it are induced to proliferate. They can destroy the pathogen, or recognize and kill cells that have been exposed to it.
Indeed, this molecular random-scrambling defense has found a match in some parasites who have many different versions of cell-surface proteins that they need for their life-cycle, and the idea (that we have about it) is that by the time our immune system has recognized the pathogen's characteristic, their cells switch to a different surface protein. We might kill those presenting the former protein but the new-presenters will have a chance to survive. This would lead to survival of these bugs, but at the same time our immune system will be able at least to contain the infection. Plants use somewhat similar switching strategies to fend off infection.
Such cat and mouse strategies should work. We should be able to detect and get rid of anything that may invade us that can be recognized and dealt with on a cellular level. So why then do we ever get sick? This is an interesting question.
Some pathogens are larger than a single cell or hide themselves in various ways. The malarial parasite gets into our red blood cells, and apparently is not vulnerable to our adaptive immune system. So we have evolved other kinds of defenses, such as red cells that resist invasion by the parasite. Of course, it doesn't always work.
In the end we need to play an extinction game: develop a means of assault at something so fundamental to a pathogen's lifestyle that it can't out evolve us. This is clearly possible in principle: most species that have lived on earth have become extinct. In each case the cause is different. But it should be possible, and some diseases like polio and small pox have been pushed close to the edge of extinction.
On the other hand, the more we present a ready target for rapidly evolving parasites, the faster we'll have to develop strategies to combat them.
Still, it would seem that many kinds of bacteria would never be able to develop characteristics we can't recognize. They may develop resistance to antibiotic attacks on some aspect of their biology, but why can't our immune system always eventually produce an effective antibody? Different diseases will provide different answers, and in most cases the answer is not known. Certainly we don't know the answers. But the evolutionary story is that the rapidly evolving simpler pathogens continually challenge our rapidly changing array of immune attacks.