Two kinds of immunity exist(1).
Innate immunity employs barriers to keep out a whole bunch of potential pathogens(1) which include "microorganisms, such as bacteria, viruses, fungi, and parasites."(2) Skin is actually a barrier that keeps out the majority of pathogens that would otherwise cross over. Perspiration and tears have enzymes helping to create antibacterial substances. Mucus traps. Stomach acid puts to death. These are beside immune cells(1).
Adaptive/acquired immunity learns and puts pathogens on the "unwanted" list. "It is regulated by cells and organs in our body like the spleen, thymus, bone marrow, and lymph nodes."(1) Bodily cells and tissues have self-antigen proteins to ID them as ok. Infectious organisms likewise produce their own antigens(2). Cells and organs create antibodies, which leads to immune cell multiplication and the conquering of the invader. The immune system then is told to "Remember the ___!" so should the same invader marches in for a repeat encounter, it is on record and there is a more efficient, speedy response(1).
There is an immune system called the complement system of "specialized molecules that work in a variety of ways to destroy invaders." The membrane attack complex is a type of structure made by the complement system to puncture pathogen cells and insert chemicals that destroy them from the inside(2). Inflammation is when immune mast cells unleash histamine proteins against invaders of cells and tissue that in turn signal requests for more white blood cells. "Inflammation may generate pain, swelling, and a release of fluids to help flush out the pathogens." If inflammation is chronic, it will damage tissue and wear out the immune system(1).
References:
1. "Nutrition and Immunity." Harvard T. H. Chan School of Public Health: Powerful ideas for a healthier world. The President and Fellows of Harvard College. Web. 6 Jul. 2021. https://www.hsph.harvard.edu/nutritionsource/nutrition-and-immunity/.
2. Shomon, Mary. "How the Immune System Works: Its complex functions work to protect you from infection." Verywell Health. About, Inc. (Dotdash). 4 Jul. 2020. Web. 6 Jul. 2021. https://www.verywellhealth.com/how-does-the-immune-system-work-3232652.