Vaccines work by mimicking the infectious bacteria or viruses that cause disease. Vaccination stimulates the body's immune system to build up defenses against the infectious bacteria or viruses (or parts of them) but does not cause the disease. The components of the vaccine that stimulate the immune system are called antigens.