How do pre and pro-biotics work?

How do pre and pro-biotics work?