A vaccine is a biological preparation that provides active acquired immunity to a particular disease. A vaccine typically contains an agent that resembles a disease-causing microorganism and is often made from weakened or killed forms of the microbe, its toxins, or one of its surface proteins. The agent stimulates the body's immune system to recognize the agent as a threat, destroy it, and to further recognize and destroy any of the microorganisms associated with that agent that it may encounter in the future. Vaccines can be prophylactic (to prevent or ameliorate the effects of a future infection by a natural or "wild" pathogen), or therapeutic (e.g., vaccines against cancer, which are being investigated).

Vaccines led to the eradication of smallpox, one of the most contagious and deadly diseases in humans. Other diseases such as rubella, polio, measles, mumps, chickenpox, and typhoid are nowhere near as common as they were a hundred years ago thanks to widespread vaccination programs. As long as the vast majority of people are vaccinated, it is much more difficult for an outbreak of disease to occur, let alone spread. This effect is called herd immunity. Polio, which is transmitted only between humans, is targeted by an extensive eradication campaign that has seen endemic polio restricted to only parts of three countries (Afghanistan, Nigeria, and Pakistan). However, the difficulty of reaching all children as well as cultural misunderstandings have caused the anticipated eradication date to be missed several times.

Vaccines may be monovalent (also called univalent) or multivalent (also called polyvalent). A monovalent vaccine is designed to immunize against a single antigen or single microorganism. A multivalent or polyvalent vaccine is designed to immunize against two or more strains of the same microorganism, or against two or more microorganisms. The valency of a multivalent vaccine may be denoted with a Greek or Latin prefix (e.g., tetravalent or quadrivalent). In certain cases, a monovalent vaccine may be preferable for rapidly developing a strong immune response.

Vaccines typically contain one or more adjuvants, used to boost the immune response. Tetanus toxoid, for instance, is usually adsorbed onto alum. This presents the antigen in such a way as to produce a greater action than the simple aqueous tetanus toxoid. People who have an adverse reaction to adsorbed tetanus toxoid may be given the simple vaccine when the time comes for a booster.

Sometime during the late 1760s whilst serving his apprenticeship as a surgeon/apothecary Edward Jenner learned of the story, common in rural areas, that dairy workers would never have the often-fatal or disfiguring disease smallpox, because they had already had cowpox, which has a very mild effect in humans. In 1796, Jenner took pus from the hand of a milkmaid with cowpox, scratched it into the arm of an 8-year-old boy, James Phipps, and six weeks later inoculated (variolated) the boy with smallpox, afterwards observing that he did not catch smallpox. Jenner extended his studies and in 1798 reported that his vaccine was safe in children and adults and could be transferred from arm-to-arm reducing reliance on uncertain supplies from infected cows. Since vaccination with cowpox was much safer than smallpox inoculation, the latter, though still widely practised in England, was banned in 1840.

According to the World Health Organization, the biggest barrier to local vaccine production in less developed countries has not been patents, but the substantial financial, infrastructure, and workforce expertise requirements needed for market entry. Vaccines are complex mixtures of biological compounds, and unlike the case of drugs, there are no true generic vaccines. The vaccine produced by a new facility must undergo complete clinical testing for safety and efficacy similar to that undergone by that produced by the original manufacturer. For most vaccines, specific processes have been patented. These can be circumvented by alternative manufacturing methods, but this required R&D infrastructure and a suitably skilled workforce. In the case of a few relatively new vaccines such as the human papillomavirus vaccine, the patents may impose an additional barrier.

Cases of veterinary vaccines used in humans have been documented, whether intentional or accidental, with some cases of resultant illness, most notably with brucellosis. However, the reporting of such cases is rare and very little has been studied about the safety and results of such practices. With the advent of aerosol vaccination in veterinary clinics for companion animals, human exposure to pathogens that are not naturally carried in humans, such as Bordetella bronchiseptica, has likely increased in recent years. In some cases, most notably rabies, the parallel veterinary vaccine against a pathogen may be as much as orders of magnitude more economical than the human one.