Immunity is the system of defense in the body which gives protection against foreign materials, specifically infectious microorganisms – bacteria, viruses, parasites, and their products (see also immune system).


For many diseases, prior exposure to the causative organism in disease itself or by vaccination provides acquired resistance to that organism; further infection with it is unlikely or will be less severe. This type of immunity is usually mediated by antibodies and antigens reactions and is known as humoral immunity. The antigens of microorganisms provoke the formation of the antibody specific to that antigen. Once formed the antibody tends to neutralize (viruses) or to bind to antigen encouraging phagocytosis and destruction (bacteria). In some diseases the development of antibodies is of value in the phase of recovery from the primary infection; once immunity has been thus primed, the easy and rapid availability of antibody protects against further infection. Allergy and anaphylaxis are also largely mediated by humoral immunity.


A number of diseases are due to the systemic effects of immune complexes (antibody linked to antigen) which may arise in the appropriate response to an infection, or in serum sickness, and these especially affect the kidneys, skin, and joints. In autoimmunity antibodies are produced to antigens of the body's own tissues for reasons that are not always clear; secondary tissue destruction may occur (see autoimmune disease.


The second major type of immunity is cell-mediated immunity (delayed type hypersensitivity); this system is mediated by lymphocytes and monocytes (including tissue macrophages). It is a reaction only occurring with certain types of infection (tuberculosis, histoplasmosis, and fungal diseases), and in certain probably autoimmune diseases; it is also important in the immunity of transplants. Lymphocytes are primed by infection with the appropriate organisms or by the autoimmune or graft reaction and produce substances which affect both lymphocytes and monocytes and result in a type of inflammation with much tissue damage. The understanding of the role of immunity and in disorders in the causation and manifestation of many diseases has seen a substantial advance in recent decades. This has led to the development of drugs and other agents which are able to interfere with abnormal or destructive immune responses.


Immune deficiency diseases, although rare, have provided models for the separate parts of the immune system, and have led to methods of replacement of absent components of immunity.


Passive immunity is the transfer of antibody-rich substances from an immune subject to a non-immune subject who is susceptible to disease. It is important in infancy, where maternal antibodies protect the child until its own immune responses have matured. In certain diseases such as tetanus and rabies, immune serum gives valuable immediate passive protection in non-immune subjects.