If the system recognizes cells, they leave them alone. If they do not recognize the cells, they attack, thereby defending the body against bacteria and virus infected cells. There are connections between the immune system and the central nervous system. The immune system responds to chemicals and secretes chemical messages. The immune system has nerve cells that connect the brain to the spleen and other organs producing immune cells.
Stress can affect the immune system.
Organs of the immune system are called lymphoid organs. These organs produce the white blood cells that mediate the immune system. These white blood cells are called lymphocytes. Lymphocytes are produced in the bone marrow. One particular set, the T-cells, spend time in the thymus where they mature and develop the ability to distinguish self from nonself.