ionization
Ionization is whether a drug molecule carries an electric charge or not. Many drugs are weak acids or weak bases, meaning that depending on their chemistry and surroundings, they can gain or lose a proton (a hydrogen ion) and flip between a neutral, uncharged form and a charged ion. This seemingly small chemical detail has a big effect on how the drug behaves in the body.
The key consequence is membrane crossing. Cell membranes are fatty, and a charged ion is surrounded by water molecules and repelled by the oily interior, so it cannot easily diffuse through; the uncharged form, being fat-soluble, passes through readily. A drug that is heavily ionized at a given site will be poorly absorbed there, while the same drug where it is mostly uncharged will be absorbed well.
How much of a drug is ionized depends on two things: the drug's own pKa (the pH at which it is half ionized) and the pH of the surroundings. Shifting the pH shifts the balance — for a weak acid, more acid means less ionization and better diffusion; for a weak base, the reverse. This is the engine behind the pH partition hypothesis.
Ionization also matters beyond absorption. It influences how a drug distributes between body compartments, can trap a drug on one side of a membrane (ion trapping), and is exploited in poisoning — for example changing urine pH to keep an overdosed drug ionized in the tubule so it is excreted rather than reabsorbed.
At a pH equal to its pKa, a drug is exactly 50% ionized; each unit of pH change shifts the ratio about tenfold.