Lymph nodes contain immune system cells that act as a barrier, stopping bacteria and viruses from attacking the body. These cells are divided into two very broad categories known as B and T cells.