Lymph nodes store lymphocytes and function as a filter, trapping foreign substances within their sinuses. Dr. Ananya Mandal explains that lymph fluid contains chemicals, toxins, bacteria, viruses and foreign bodies drained from various tissues. Lymph flows through a lymphatic vessel network and passes through various lymph nodes.
The cortex tissue within the lymph nodes contain collections of lymphocytes, primarily B cells. The major function of B lymphocytes is to develop into plasma cells and secrete antibodies when a foreign body is recognized. The lymph nodes also contain T lymphocytes and macrophages that cooperatively target and attack foreign invaders, explains Todar's Online Textbook of Bacteriology.