When you do an extraction, you're trying to separate different compounds with different functional groups and isolate them. There is the organic layer, which is insoluble in water and initially contains all of your compounds that you will eventually separate. The organic layer also contains a solvent (CH2Cl2 or ether) that is insoluble in water. So the organic layer= Compounds we're trying to separate + insoluble solvent. The compounds we're trying to separate are insoluble because even though their functional groups may have dipoles which make them polar, they usually have large R groups that are made of carbon, thus making the whole thing insoluble in water and masking the solubility of the functional group itself. But, the compounds + the solvent are soluble with each other. You separate (extract) the compounds from the insoluble organic layer by making them charged, i.e. adding acid/base to them to protonate/deprotonate the functional groups. Whether you add acid or base, and the order in which you add each acid or base, will depend on the compounds you have. Here's the rules we need to know (from chad): amines are extracted by HCl (amine gets protonated), carboxylic acids are extracted by NaHCO3 or NaOH (carb acid gets deprotonated), phenols are extracted by NaOH (phenol gets deprotonated). After you add each acid or base, you will form a new aqueous layer that contains the compound you were trying to extract. The compound has now become soluble in water because we added a charge to it (positive or negative). Each time you form a new aqueous layer with a new compound, you can isolate it in a test tube. Ether is not soluble because there's not a strong enough dipole between the O and the C to give the O enough of a partial negative charge that would make it water soluble. This is because there's not a big enough electronegativity difference.
(anyone correct me if I made any mistakes, but I think this is the gist)