Immunity is a state of specific resistance to infection. Specific resistance is directed against a particular type of microorganism and is the single most important characteristic of immunity.
The immune system enables the body to recognize a foreign agent as nonself, which is something other than a person's own substances (self). The immune system takes a specific action for neutralizing, killing, and eliminating that agent. The action involves nonspecific resistance as well. On occasion, the immune system activity may lead to tissue damage as seen in allergic disorders and other states of hypersensitivity.
The immune system's activity is based on its ability to distinguish characteristic proteins or protein-linked components associated with alien substances. Once this distinction has been made, certain lymphocytes are provoked to produce antibodies directed against the foreign matter, while other lymphocytes are sensitized to the invading agent and react with it directly. Thus, there are two major branches of the immune system: antibody-mediated immunity (also known as humoral immunity) and cell-mediated immunity.