Vaccines don't necessarily prevent the infection, it just helps decrease the possibility of catching the infection. A vaccine is an injection of the infection itself so that your white blood cells know how to attack the "foreigner" and IF you do end up with the sickness, it takes less time to get over it. Hope this helps :)