The colossal task of keeping the body safe from outside and inside attacks of bacteria, viruses, and other nasty critters belongs to the immune system. Your skin and mucous membranes are the first line of defense from invaders entering through the skin or through openings in the body. A second line of defense exists inside the body to challenge invaders that make it through the first line of defense. Sounds more like a war strategy, doesn't it? That's how your body treats anything that isn't supposed to be there—as an invader that must be destroyed.
The internal environment of the human body provides attractive conditions for growth of bacteria, viruses, and other organisms. Although some of these organisms can live symbiotically within humans, many either cause destruction of cells or produce toxic chemicals. To protect against these foreign invaders, three lines of defense are employed: nonspecific barriers that deter the entrance of invaders, and both nonspecific and specific defenses against invaders inside the body. A nonspecific defense is a rapid response to a wide range of pathogens. A specific defense, delivered by the immune system, takes several days to mount and target specific invaders that escape the attack of the nonspecific defense.