Substance used to protect against infection with certain diseases, such as hepatitis or measles.