The immune system refers to the complex network of cells, tissues, and organs that protect the body against infections and diseases. It consists of different cells, such as white blood cells, and organs, such as lymph nodes and the spleen. The function of the immune system is to recognize and combat foreign substances, such as bacteria and viruses, and to protect the body from damage.