An autoimmune disease is when the immune system attacks healthy cells, organs, and tissues in the body, while an immunodeficiency is an impairment of the immune system.