Electrophoresis is a technique used to isolate nucleic acids and proteins in mixed samples, by applying an electric current to a gel matrix in which samples have been placed.
When the technique is being used to isolate DNA fragments, the gel matrix is a cross-linked polymer called agarose. A solid block of the gel is used in electrophoresis, and is placed in a small tank into which a buffering solution is poured, deep enough to cover the gel.
Next, samples of DNA are mixed with a small amount of dye. A further sample of DNA fragments of known size are also used, to act as markers on the gel. Each sample is loaded into tiny wells at one end of the agarose gel, with one sample per well.
When the samples have been added, an electric current is applied to the gel. The term “electrophoresis" refers to the fact that molecules are propelled through the gel matrix by an electromotive force.
The distance a DNA fragment travels through the gel is dependent on its mass, with smaller particles moving more quickly, and larger ones moving slowly. Once the current has been applied the gel is left to run until the dye solution (which moves through the gel more quickly than nucleic acids) reaches the other end of the gel.
Once the process is complete, the gel is immersed in an ethidium bromide solution, which colors the DNA samples so they can be viewed under ultra violet light.
In the image provided, a single column of horizontal bands represents the contents of one sample. Each band corresponds to a single DNA fragment from the initial sample. The larger fragments at the top of the gel have moved slowly and tend to congregate in a single clump, while the smaller have migrated quickly and are well-separated.