The immune system is the body’s tool for preventing or limiting infection. Without it, the body would be unable to withstand attacks from bacteria, viruses, parasites, and more.

The immune system consists of a vast network of cells, organs, proteins, and tissues throughout the body.

A fully functional immune system can distinguish healthy tissue from unwanted substances. If it detects an unwanted substance, it will mount an immune response — a complex attack to protect the body from invaders. It also recognizes and removes dead and faulty cells.

The immune system does not always get it right, however. Sometimes, for instance, it is unable to fight effectively because a person has a health condition or needs certain medications that affect how the system works.

In autoimmune diseases and allergies, the immune system mistakenly perceives healthy tissue as unhealthy and launches an unnecessary attack, leading to uncomfortable and sometimes dangerous symptoms.