The immune system is a complex and multifaceted combination of body systems that guards against disease processes and protects the body against infection. These systems detect various pathogens (such as bacteria and viruses) and other dangers such as parasites, foreign bodies, and other external threats. It then activates other body mechanisms to combat these intruders. Like any complex body system, the immune system can be compromised; age, poor health, and disease can weaken the immune responses and cause adverse affects.
There are numerous "autoimmune" conditions: conditions where the immune system fails and the body essentially turns on itself and destroys its own healthy tissues. This is what causes diseases like rheumatoid arthritis, scleroderma, cancer, and numerous others. In recent decades the rise of HIV/AIDS, a contagious condition that destroys the immune system, leaves its victims weakened to the point of succumbing to diseases that would otherwise be relatively easy to treat.