Active immunity develops in a body on being exposed to a live pathogen. Here, the pathogen establishes an infection, which is then subdued in time and the immunity is built due to the formation of memory cells. Passive immunity occurs when certain antibodies are passed from one individual to another. Our body has a two line defence system against pathogens. The first line of defence against pathgens are the surface barriers like the skin, and others like tears, saliva, etc. If the pathogens are able to get past the first line of defence, for example, through a cut in your skin, and an infection develops, the second line of defence becomes active. Through a sequence of steps called the immune response, the immune system attacks these pathogens. Phagocytosis is a part of second line of defense.