Understand the function of lymph nodes in the immune system: Lymph nodes are small, bean-shaped structures that are part of the lymphatic system. Their primary role is to filter lymph, a fluid containing white blood cells, to remove pathogens, debris, and abnormal cells.