The nonpolar liquids octane (C8H18) and carbon tetrachloride (CCl4) are miscible; they mix in all proportions to form a homogeneous solution. On the other hand, polar water and nonpolar octane are immiscible. You would observe that the less dense liquid, octane, simply floats as a layer on top of the denser water layer. Finally, polar ethanol molecules (C2H5OH) dissolve in all proportions in water; beer, wine, and other alcoholic beverages contain amounts of alcohol ranging from just a few percent to more than 50%. It is these observations that have led to the familiar rule: like dissolves like. That is, two or more nonpolar liquids frequently are miscible with each other, just as are two or more polar liquids. Liquids of different types do not mix to any appreciable degree.
What is the molecular basis for the “like dissolves like” guideline? Molecules of pure octane or pure benzene, both of which are nonpolar, are held together in the liquid phase by weak dispersion forces. Similar weak forces can exist between an octane molecule and a CCl4 molecule, and these molecules are attracted to one another.
In contrast to the CCl4/octane solution, water and hydrocarbons do not mix. This observation can be analyzed with the following scheme, one that may be applied to any solvent/solute interaction.