vaccine is prevention of disease against pathogens . the work of vaccine is to boost up the body immunity towards pathogens. e.g. anti-rabies vaccine , MMR , Oral polio vaccine etc.
a child was unknown from when the pathogen attack on his body but .
in the process of vaccine the immune cells is trained for future infections . for e.g. when a child got IPV vaccine by birth then he/she is ready to fight because the vaccine charge his immune system for the future infection and when immune system first sees an infectious microbe , it responds against it an then remembers it specifically . so the next time that pacxticular microbe , or its close relatives enter the body then the immune system responds with greater force and velocity and this terminates the infection more quickly than the FIRST TIME . immune system also develops our memory by putting that mimics to the microbe that prevents us from subsequent exposure to infecting microbe .