Dissolution occurs when solute-solvent interactions overcome solute-solute and solvent-solvent interactions. Solvation (or hydration in water) is the process where solvent molecules surround and stabilize dissolved ions or molecules. Polar solvents excel at dissolving ionic compounds; nonpolar solvents dissolve nonpolar solutes (like dissolves like).
From your study of intermolecular forces, you know that molecules attract each other through dipole-dipole interactions, hydrogen bonds, and London dispersion forces. Dissolution is fundamentally a competition among three sets of these forces. To dissolve a solute, you must first pull solute particles apart from each other (breaking solute-solute interactions), then push solvent molecules aside to make room (breaking solvent-solvent interactions), and finally form new attractive contacts between solute and solvent (creating solute-solvent interactions). Dissolution is favorable when the energy gained from new solute-solvent interactions roughly compensates for the energy spent breaking the other two.
Solvation is the name for the process where solvent molecules arrange themselves around each dissolved particle, forming a stabilizing shell. When the solvent is water, this process is called hydration. Picture dropping a crystal of NaCl into water: at the crystal surface, the partially negative oxygen atoms of water molecules orient toward Na⁺ ions, while the partially positive hydrogen atoms point toward Cl⁻ ions. These ion-dipole interactions are strong enough to overcome the ionic lattice energy holding the crystal together. Each ion ends up surrounded by a structured cage of water molecules — its hydration shell — which stabilizes the ion in solution and prevents it from recombining with its counterion.
The "like dissolves like" rule is a practical shortcut that follows directly from this energy analysis. Polar solvents like water form strong dipole-dipole and hydrogen-bonding interactions among themselves. To dissolve in water, a solute must offer comparably strong interactions — ionic compounds and polar molecules qualify, but nonpolar molecules like oil cannot form strong enough interactions with water to compensate for disrupting water's hydrogen-bonding network. Conversely, nonpolar solvents like hexane interact through weak London dispersion forces. Nonpolar solutes dissolve easily because the solute-solvent dispersion forces are similar in strength to the solute-solute and solvent-solvent forces being broken.
Understanding solvation at this level explains many everyday observations. Sugar dissolves in water because its many -OH groups form hydrogen bonds with water. Grease does not dissolve in water but dissolves readily in mineral spirits because both are nonpolar. Soap works by having a polar head that interacts with water and a nonpolar tail that interacts with grease — bridging the two incompatible worlds. The energetics of solvation also set the stage for understanding saturation limits, colligative properties, and the thermodynamics of solutions that you will encounter next.