Babies are born with some antibodies (infection-fighting substances) in their bloodstream that were passed on to them in the womb from their mother. But as those inherited antibodies decrease in the first year of life, a baby must develop new antibodies and other infection-fighting substances. When he gets a cold or the flu, for instance, baby develops antibodies against the illness that protect him from getting the same virus as easily again.
However, there are some serious diseases you wouldn't want your child to catch just so he can become resistant to them. That's where vaccines come in.
Vaccines teach a baby's immune system how to recognize and fight off specific infections. Most vaccines are made from an inactive form of a virus, though a few (i.e., the measles vaccine) are made from a weakened form of a live virus. These vaccines don't cause disease but can stimulate a baby's body to recognize it.