Two Systems, Not One
The immune system is a network of biological systems that protects an organism from disease. It detects and responds to viruses, bacteria and parasites, as well as cancer cells and foreign objects such as wood splinters, while distinguishing all of them from the body's own healthy tissue.
Most species run two major subsystems rather than one.
The innate immune system provides a preconfigured response to broad categories of threat. It is fast, general purpose, and identical every time. Every animal has one.
The adaptive immune system does something far stranger. It builds a tailored response to each individual threat, by learning to recognise molecules it has encountered before. This is the one that improves with experience, and vertebrates with jaws, including us, have the most sophisticated version.
Both depend on a single underlying ability: telling self from non-self. Self molecules are the components of your own body. Non-self molecules are everything recognised as foreign.
Defence in Layers
The system is built as a series of layers, each more specific than the last, and a pathogen has to beat them in order.
First come physical barriers, which simply prevent bacteria and viruses from getting inside at all. If something breaches those, the innate immune system delivers an immediate but non-specific response, the biological equivalent of a general alarm.
If a pathogen manages to evade that too, vertebrates have a second line: the adaptive immune system, which is switched on by the innate response. During the infection it adapts, improving its recognition of that specific invader.
And here is the part that matters most. After the pathogen has been destroyed, the improved response is retained as immunological memory. The next time that same pathogen appears, the adaptive system mounts a faster and stronger attack. Every subsequent encounter is easier than the last, which is why you generally catch a given illness once.
Why Vaccines Work At All
That memory is not a side effect. It is the entire mechanism behind vaccination.
In jawed vertebrates, adaptive immunity can adapt to recognise pathogens more efficiently through a process called somatic hypermutation, creating immunological memory that produces an enhanced response on any later encounter. A vaccine simply provides that first encounter in a form that will not hurt you, so the filing system gets written without the illness being suffered.
Nearly every organism has some sort of immune defence. Even bacteria have a rudimentary one, in the form of enzymes that protect against viral infection. Other basic mechanisms evolved in ancient plants and animals and survive in their modern descendants, including phagocytosis, antimicrobial peptides called defensins, RNA interference, and the complement system.
So immunity is not a late human refinement. It is one of the oldest problems life has, solved repeatedly and independently, with our version being an unusually elaborate late addition.
When It Goes Wrong in Both Directions
A system this powerful can fail in two opposite ways, and both are serious.
Immunodeficiency is when the immune system is less active than it should be, leading to recurring and life-threatening infections. In humans this can come from a genetic condition such as severe combined immunodeficiency, from an acquired condition such as HIV and AIDS, or from immunosuppressive medication taken deliberately.
Autoimmunity is the mirror image: a hyperactive immune system attacking normal tissue as though it were a foreign organism. The self and non-self distinction, which the whole system rests on, breaks down. Common autoimmune diseases include Hashimoto's thyroiditis, rheumatoid arthritis, type 1 diabetes and systemic lupus erythematosus.
Dysfunction of the immune system is also implicated in inflammatory disease and in cancer. The field that studies all of this, from the barriers to the memory to the failures, is called immunology.
