Mollies and guppies can crossbreed. They're both a member of the poecilia genus. And the gonopodiums are almost alike which enables them to mate with eachother.
Swordtails and platies are members of the xiphophorus genus and also the gonopdiums of the males of the xiphophorus genus differ from mollies and guppies which won't enable them to mate with mollies nor guppies.
A lot of people don't know that the shape of gonopodiums do differ. Which is important to know wether different livebearers can mate or not with another.
So, it depends mostly on the shape of the gonopodium wether they can crosbreed or not. And not just because they're all livebearers. Goodeids (splitfins) however belong to the real livebearers but the males don't have a gonopodium but an andropodium.