Usually some differing property of the two compounds is abused. For example, is one compound magnetic, but the other not? Pass a magnet over the mixture, and you’ll only get the magnetic compound.
Do your compounds boil at different temperatures? Use fractional distillation, a technique which separates compounds using their different boiling points. It is often used in the purification of oil.
If the densities of the compounds are different, it might be possible to separate them suing a centrifuge (the image below shows blood run through a centrifuge, notice how the plasma has been sifted out from the red blood cells on the bottom of the tube):