Sometimes the immune system mistakes body cells for foreign material, causing the immune system to attack the body itself. This causes inflammation and damages various body tissues.