The immune system defends the body by recognizing and neutralizing harmful pathogens like bacteria, viruses, and fungi. It includes barriers like the skin, white blood cells that attack invaders, and specialized organs like the spleen and lymph nodes. The adaptive immune system "remembers" past infections, providing quicker and stronger responses to subsequent attacks.