Part of the immune system, lymph nodes are small bean-shaped glands found throughout the body. The glands trap bacteria, viruses, and other foreign substances, such as cancer cells. Lymphocytes, a type of white blood cell, work to destroy the foreign substances.