A vaccine is a suspension of weakened, killed, or fragmented microorganisms or toxins or of antibodies or lymphocytes that is administered primarily to prevent disease.

A vaccine can confer active immunity against a specific harmful agent by stimulating the immune system to attack the agent. Once stimulated by a vaccine, the antibody-producing cells, called B cells (or B lymphocytes), remain sensitized and ready to respond to the agent should it ever gain entry to the body. A vaccine may also confer passive immunity by providing antibodies or lymphocytes already made by an animal or human donor. Vaccines are usually administered by injection (parenteral administration), but some are given orally or even nasally (in the case of flu vaccine). Vaccines applied to mucosal surfaces, such as those lining the gut or nasal passages, seem to stimulate a greater antibody response and may be the most effective route of administration.

The first vaccine was introduced by British physician Edward Jenner, who in 1796 used the cowpox virus (vaccinia) to confer protection against smallpox, a related virus, in humans. Prior to that use, however, the principle of vaccination was applied by Asian physicians who gave children dried crusts from the lesions of people suffering from smallpox to protect against the disease. While some developed immunity, others developed the disease. Jenner’s contribution was to use a substance similar to, but safer than, smallpox to confer immunity.

More Info: en.wikipedia.org