Antibiotics work by killing bacteria that are causing an infection. However, they also tend to kill other good, beneficial bacteria at the same time, such as the normal bacteria that live in the intestines and in the vagina. Killing off these good bacteria leads to many of the major side effects of antibiotics, such as diarrhea
and vaginal yeast infections.
Yogurt in theory can protect against some of these side effects because it contains a number of species of 'good bacteria' which can replace the good bacteria that are killed off by the antibiotic, thereby preventing diarrhea and yeast infections. However, the scientific studies that have examined the actual benefit of eating yogurt as a preventative measure have been mixed. In short, eating yogurt may help you prevent these side effects while taking antibiotics, but the beneficial effect is probably pretty small, and there is no compelling reason to do it if there is another reason not to (such as really disliking yogurt).
Nevertheless, what you should definitely do is stay in close contact with your primary care doctor
while you are taking the antibiotics. If you develop any significant side effects, you should touch base with them right away!