So we can live the immune system is a complex system of cells, tissues, and organs whose purpose is to protect the body against infection. the function of the immune system. It originates from medicine and early studies on the causes of immunity to disease.