Immune system and bacteria in gut

I’ve read that one of the ways yoghurt is supposed to be beneficial is that it stimulates your immune system. How would this work? Do the bacteria move into the blood stream and then are attacked by white blood cells? I know we have beneficial bacteria in our intestines, so I wouldn’t expect them to be attacked in the gut. How does this whole immune system good/bad bacteria thing work?

Immunologic effects of yogurt, Meydani and Ha, 2000.
From the abstract:

There’s no good way to answer “how” in layman’s terms, so here’s some jargon:

IgA adaptation to the presence of commensal bacteria in the intestine.

Probiotics stimulate production of natural antibodies in chickens.

Both of those were animal studies. It’s not clear whether the same pathways occur in human adults. However, there does appear to be plenty of evidence that bacteria stimulates the immune system in newborns.

Thanks. Once you mention it, it is obvious there is more to “immune response” than leukocytes. Doh!