This can be done with either gravity sedimentation or centrifugation. Materials of different densities, when left undisturbed for some time, tend to settle down in layers, in order of their densities. This is only true for the materials that are immiscible or insoluble in each other. Gravity sedimentation will force them to settle down in layers, with the heaviest liquid at the bottom and the lightest (one with the lowest density) liquid at the top. Other liquids will form layers in order of decreasing densities, as one moves from bottom to top. Centrifugation, with the help of a centrifuge, will also segregate all these liquids into different layers and this would be a faster process as compared to gravity settling.
Once all the liquids have been segregated into layer, according to their respective densities, one can progressively remove one layer at a time using a straw or pipette.
Hope this helps.