gel electrophoresis
Imagine a crowd asked to run through dense underbrush toward a finish line: small, nimble people slip through quickly while large ones get tangled and lag behind. Gel electrophoresis sorts DNA fragments in much the same way, separating a mixture by size so you can see what lengths are present.
DNA is loaded into wells at one end of a slab of gel, a jelly-like mesh, and an electric field is switched on. Because DNA's backbone is negatively charged, every fragment is pulled toward the positive electrode. The gel's mesh resists their movement, and shorter fragments thread through it faster than longer ones, so over time the fragments fan out into separate bands according to length.
After the run, the DNA is stained so the bands become visible, and their positions are compared against a ladder of known sizes to estimate each fragment's length. It is a simple, everyday technique used to check the results of a restriction digest or a PCR, to confirm a fragment's size, or to purify a particular band — a basic sense organ of the molecular biology lab.
After cutting a plasmid with a restriction enzyme, a researcher runs the products on a gel; two bands appear, confirming the DNA was cut into two fragments of the expected sizes.
Bands at expected positions confirm a digest worked as planned.
The same separation principle works for proteins and RNA with appropriate gels and conditions; for DNA, agarose gels handle larger fragments while finer polyacrylamide gels resolve fragments differing by a single base.