It used to be believed that planets in binary and trinary systems couldn't be stable - that Tatooine, for example, was an impossibility.
We've now found planets in stable orbits in such systems - and now we're working out how they manage it.
When two stars orbit close together, it affects the development of their planetary discs...which tilt away from each other. (Check the article here).
This then means that when the planets form, instead of orbiting around the star's equator (as the planets in our solar system do), they orbit at an angle...keeping the two systems separated. Thus, there's little to no risk of them hitting each other, affecting each other's orbits or otherwise becoming unstable.
(We still don't know why exoplanets in single star systems sometimes have bizarrely tilted orbits...but there are a number of possibilities, all of which may well be true).