The distribution of a solute between two phases is an equilibrium condition described by partition theory.
A solid sample containing the desired compound along with impurities is placed in the thimble.
An extracting solvent is chosen in which the impurities are insoluble and the desired compound has at least limited solubility.
After extraction is complete the solvent can be removed and the desired product collected.
Boiling tea leaves in water extracts the tannins, theobromine, and caffeine out of the leaves and into the water, as an example of a solid-liquid extraction.