Eating yogurt or taking probiotics will prevent yeast infections from antibiotics.
Yogurt and probiotics containing lactobacilli are commonly used and recommended to prevent vaginal yeast infections that often develop after antibiotic treatment.
Antibiotics kill off many of the "friendly" normal flora of the GI tract and vagina. This opens the door for pathogenic organisms to take hold and potentially cause a yeast infection.
The thinking is that taking probiotics such as lactobacilli during antibiotic treatment will help replace some of the normal flora and prevent colonization of pathogenic organisms.