A small-molecule drug is a compact chemical structure — usually a few dozen atoms of carbon, hydrogen, oxygen, nitrogen, and a few others, linked into rings and short chains. Its size is what makes it a small molecule: large enough to carry specific chemical groups, small enough to be absorbed, distributed through the body, and eventually cleared.
The target protein has a pocket on its surface, a cavity whose shape and chemical character are determined by the protein's own atoms. The drug works by sitting in that pocket. Where the molecule touches the protein, complementary groups line up: a hydrogen-bond donor meets an acceptor, a flat ring stacks against a flat ring, a charged group meets an opposite charge. The fit is not rigid. Both the molecule and the protein flex, and the bound state is a balance between the contacts that form and the water molecules that are displaced.
Binding is also reversible. The molecule attaches, holds for some time, then releases, and the protein resumes its activity until another molecule binds. Two numbers describe this behavior. Affinity measures how tightly the molecule holds — a lower dissociation constant \(K_d\) means a smaller fraction of protein is unoccupied at a given drug concentration, so the molecule is more potent. Residence time measures how long a single binding event lasts. A molecule can be potent but short-lived, or modest in affinity but slow to leave, and those are different pharmacological profiles.
Selectivity is the second requirement. The pocket of the intended target resembles pockets in related proteins, so a molecule that fits one may fit others. Binding an unintended protein is what produces side effects, which is why a candidate is judged not only on how well it hits the target but on how poorly it hits everything else.