Extractions use two immiscible phases to separate a solute from one phase into the other. The distribution of a solute between two phases is an equilibrium condition described by partition theory. Boiling tea leaves in water extracts the tannins, theobromine, and caffeine (the good stuff) out of the leaves and into the water. More typical lab extractions are of organic compounds out of an aqueous phase and into an organic phase.
Illustration of an extraction in a separatory funnel
Elemental analysis generally requires fairly simple (not necessarily easy) sample preparation. Solids are usually dissolved or digested in caustic solution and liquids are sometimes extracted to separate the analyte from interferences.
Organic analysis is often much more complicated. Real-world samples can be very complicated matrices that require careful extraction procedures to obtain the analyte(s) in a form that can be analyzed.