Well... they don't all! The only entity which existed at the same time as the other 3 you've written are the Abbasids. The Fatimids were conquered in their entirety by the Ayyubids, and in turn the Ayyubids fell to the Mamluks. Of course they coexisted for a short time while the original was being conquered, but 'coexistence' is not really the right term.
As for the Abbasids, by the time of the Fatimids in the late 10th century AD they had been pushed back to Iraq so for the short time the two existed 'physically' alongside one another, they existed in different places. The Fatimids in North Africa and Syria, and the Abbasids in Iraq and Iran. By the time the Fatimids conquered Cairo in 969, the Abbasids had no real power at all after centuries of fragmentation and decline. I mean, by the 11th century the Abbasids themselves were conquered by another dynasty, the Buyids, who kept the caliphate but reduced it to a sort of symbolic title with some vague religious authority, almost analogous to the papacy in Europe. So the Abbasids technically still existed but didn't really hold any land of their own and weren't 'sovereign' in the lands they did lay claim to. So by the time the Ayyubids and Mamluks came into power the Abbasids had been out of power for like 150 years and had no secular authority whatsoever as they'd had between 750 and 880.