Vaccines and Antibiotic aid in the battle against Viruses and Bacteria

To What extent do Vaccines and Antibiotic aid in the battle against Viruses and Bacteria and how does the immune system adapt to different types of pathogens.