Ideally you want prebiotics (food ingredients that beneficially support intestinal bacteria) just as much as probiotics, because probiotics without prebiotics are unlikely to sustain as healthy a population and are more likely to cause wind and bloating. The prebiotics sustain the probiotic populations.
For probiotics you want bacteria primarily from the lactobaccilus and bifidobacterium strains. These two provide definite benefit, and survive stomach acid well enough to get to the large intestine where they can bed down and start doing their thing. Fortunately most fermented foods contain both of these strains and various subspecies of each, but when looking at probiotic supplements make sure that they contain both of these or you'll be wasting money. For supplements also look to see that there's at least 20 billion cultures per dose (ideally 50 billion), and more than one individual species - mostly five-ten individual species coming from the two strains mentioned above is the recommended number. Less than that and there typically isn't the best variety to promote good intestinal balance (and so you might get gassy), and too many more and competition might be too great to promote optimal balance and function. Best foods are those people have already been listing - kimchi, saurkraut, kefir, yogurt, kombucha (one of my favorites), tempeh and miso, and people also often forget about cheese which, if made without pasteurization (if pasteurized then forget it as that kills the live cultures - same with dairy drinks unless the cultures are added afterwards), is an excellent provider of healthy bacteria - gouda, swiss cheese, blue cheese, goats cheese, parmesan, feta and cheddar are all good. Pickles also have good probiotic cultures, especially if they are described as naturally fermented, brine fermented, or come in a cloudy brine.
For prebiotics, oats, barley, bran, raw and lightly cooked alliums (onions, garlic, leeks, shallots), asparagus, artichokes, and seaweed and algae powders are all great. I never saw it when living in the UK but jicima root is an awesome fruit that I get here that works really well too. Apparently dandelion and burdock are also good prebiotics. All of these foods contain a range of resistant starches and other chemicals like inulin which, as already mentioned, makes for a good supplement as a prebiotic.
Personally I think the importance of pre and probiotic foods are vastly underrated for general wellbeing, not just specifically digestive health. There's been a lot of research in recent years on the importance of healthy gut bacteria and it's seemingly way more important and far reaching than has been previously realized. One thing I would caution though is trying to treat specific digestive issues simply by bombarding the gut with all the probiotics you can eat. The evidence shows that specific issues require specific bacterial strains, or specific balances of specific strains, as treatments. Just throwing a load of supps and foods at the problem might not help.