Beyond Discovery

Biology & Life Sciences

How the Immune System Defends the Body

A clear guide to the immune system: barriers, first-responder cells, antibodies and T cells, immune memory, vaccines, and what happens when defenses misfire.

By Beyond Discovery 7 min read

A magnified image of a white blood cell surrounded by red blood cells in a sample of blood
Image: IMGMIDI, Pixabay Content License

Every day, your body is under siege. Bacteria ride in on your food, viruses float in the air you breathe, and fungal spores settle on your skin. Most of the time you never notice, because a defense force of extraordinary sophistication deals with them quietly. When you do notice, with a fever, a sore throat or a swollen cut, you're feeling that force in action.

The immune system isn't a single organ. It's a network of barriers, cells, chemical signals and organs spread throughout the body, organized into layers. In this article you'll follow those layers from the outside in: the walls that keep invaders out, the rapid-response cells that attack anything suspicious, the specialist units that learn to recognize one particular enemy, and the memory that can protect you for decades. You'll also see how vaccines use that memory, and what happens when the system makes mistakes.

Layer 1: walls and moats

The best infection is one that never starts. Your first line of defense is a set of physical and chemical barriers.

  • Skin is a tough, waterproof wall of tightly packed cells, with an outer layer of dead cells that constantly flakes away, taking microbes with it. Its surface is slightly acidic, which discourages many bacteria.
  • Mucus in your nose, throat and lungs traps particles and microbes. Tiny hairs called cilia sweep it upward to be swallowed or coughed out.
  • Stomach acid destroys most microbes in food and drink.
  • Tears, saliva and mucus contain lysozyme, an enzyme that breaks down the walls of some bacteria. Alexander Fleming discovered it in 1922, several years before he noticed penicillin (the story of that more famous discovery is told in penicillin and the accidental birth of antibiotics).
  • Friendly bacteria living on your skin and in your gut take up space and resources that harmful microbes would otherwise use.

Layer 2: the first responders (innate immunity)

Imagine stepping on a thorn. Bacteria from the thorn and the ground are now inside your tissue, past the skin barrier. Within minutes, the second layer, the innate immune system, goes to work.

Innate immunity responds fast and attacks anything that looks foreign, using sensors that recognize features common to many microbes, such as components of bacterial cell walls. It doesn't need to have met that particular germ before.

The key players include:

  • Macrophages ("big eaters"), large cells stationed in tissues that engulf and digest microbes and debris. They also release chemical alarm signals.
  • Neutrophils, the most abundant white blood cells in the blood. Summoned by those alarms, they pour out of blood vessels within hours and devour bacteria. They are short-lived; the pus in an infected wound is largely made of dead neutrophils.
  • Natural killer cells, which recognize and destroy body cells that have been infected by viruses or have turned cancerous.
  • Complement proteins, a team of proteins in the blood that can punch holes in bacteria and tag them for destruction.

The alarm signals also trigger inflammation. Blood vessels widen and become leakier, letting fluid and immune cells reach the site. That's why an infected area becomes red, warm, swollen and painful. Inflammation can be uncomfortable, but it is a sign the defense is working. Some signals also travel to the brain and reset the body's thermostat, causing a fever; higher temperatures can make conditions harder for some microbes and speed up certain immune responses.

Calling in the specialists

Some innate cells do something crucial beyond fighting: they carry evidence. Dendritic cells collect fragments of the invader, called antigens, and travel through the lymphatic vessels to the nearest lymph node. There they present the antigens to the cells of the adaptive immune system, a bit like showing a wanted poster to detectives. This is why lymph nodes in your neck may swell and feel tender when you have a throat infection: they're busy.

Layer 3: the specialists (adaptive immunity)

The adaptive immune system is slower to start, but it is precise, powerful and, crucially, it remembers. Its main agents are two kinds of white blood cell called lymphocytes.

B cells produce antibodies, Y-shaped proteins that latch onto one specific antigen. Antibodies can neutralize a virus by blocking the parts it uses to enter cells, clump bacteria together, and flag invaders for destruction by other immune cells. B cells mature in the bone marrow.

T cells mature in the thymus, a small organ behind the breastbone. They come in several kinds. Helper T cells coordinate the response, activating B cells and other immune cells. Cytotoxic (killer) T cells find and destroy body cells infected by viruses, which antibodies can't reach once a virus is inside a cell.

Here's the remarkable part. Each B or T cell carries receptors that recognize just one antigen shape. By shuffling and recombining gene segments as these cells develop, your body produces an enormous diversity of receptors, enough to recognize a vast range of possible invaders, including ones that have never existed before. When an antigen arrives, the few cells whose receptors fit it are selected and multiply rapidly into an army of identical clones. This process is called clonal selection.

Innate immunityAdaptive immunity
SpeedMinutes to hoursDays to about two weeks on first encounter
TargetsBroad features shared by many microbesOne specific antigen
Key cellsMacrophages, neutrophils, natural killer cells, dendritic cellsB cells and T cells
MemoryVery limitedLong-lasting
Present at birth?YesDevelops through life as you meet new antigens

The power of memory

After an infection is cleared, most of the army of B and T cells dies off. But some remain as memory cells, which can survive for years or even decades. If the same germ returns, they recognize it immediately and launch a response that is faster and stronger than the first. Often, the invader is eliminated before you feel ill at all. This is why most people get chickenpox only once.

Vaccines take advantage of this memory. A vaccine safely presents the immune system with antigens, using a weakened or inactivated germ, a harmless piece of it, or genetic instructions for making one of its proteins, so the body can build memory without suffering the disease. The long history of this idea, from Edward Jenner's smallpox experiments in 1796 to modern mRNA vaccines, is told in how vaccines were developed. When enough people in a community are immune, a germ struggles to spread, which also protects those who can't be vaccinated, such as newborns.

When the system misfires

A defense force this powerful has to be carefully controlled, and sometimes it goes wrong.

  • Allergies happen when the immune system overreacts to harmless substances like pollen, peanuts or pet dander, producing a type of antibody (IgE) that triggers the release of histamine and other chemicals. The result can be sneezing and itching or, in severe cases, life-threatening anaphylaxis.
  • Autoimmune diseases occur when the immune system mistakenly attacks the body's own tissues. In type 1 diabetes, it destroys insulin-producing cells in the pancreas; in rheumatoid arthritis, it attacks the joints.
  • Immunodeficiency means part of the system is missing or weakened. Some forms are inherited; others are acquired. HIV, for instance, infects and destroys helper T cells, leaving the body vulnerable to infections it would normally fight off.

Antibiotics, viruses and common misunderstandings

Antibiotics kill bacteria or stop them from multiplying, but they have no effect on viruses, which is why they don't help with colds or flu. Overusing them encourages bacteria to evolve resistance. Understanding which germs cause which diseases traces back to the nineteenth century, when scientists proved that specific microbes cause specific illnesses; see how germ theory changed medicine.

Another common idea is that you can dramatically "boost" your immune system with particular foods or supplements. In reality, the immune system works best when it is balanced, not maximized: an overactive immune response causes problems of its own. What the evidence does support is the everyday basics: balanced nutrition, regular physical activity, enough sleep, staying up to date with recommended vaccines and good hand hygiene.

Try this: a germ-spread demonstration. Rub a little hand lotion on one child's hands, then sprinkle on a pinch of glitter. Have that child shake hands with a few others, who then touch a doorknob or a pencil. Within minutes the "germs" are everywhere. Then try washing with water alone versus soap and warm water for 20 seconds, and compare how much glitter is left. Adults should supervise, and keep glitter away from eyes.

The essentials

  • The immune system works in layers: barriers, fast innate defenses and slower, specific adaptive defenses.
  • Innate cells such as neutrophils and macrophages attack broadly and quickly; inflammation and fever are part of their response.
  • Dendritic cells carry antigens to lymph nodes, where B and T cells are activated.
  • B cells make antibodies; T cells coordinate the response and kill infected cells.
  • Memory cells give long-lasting protection, which vaccines harness safely.
  • Allergies, autoimmune diseases and immunodeficiencies arise when the system overreacts, misfires or is weakened.

Questions to talk about: Why do you think the body has both a fast, general defense and a slow, specific one, instead of just one? Why might a fever be helpful, even though it feels miserable? To learn about the white blood cells' place among the body's trillions of other cells, read cells: the building blocks of life, or browse more biology and life sciences articles.

Sources and further reading