Answer:
Gel electrophoresis separates DNA based on size. The place where samples are loaded on the gel is called the origin. DNA is negatively charged and therefore moves toward the positive electrode under the influence of an electric current.
Smaller fragments migrate toward the positive electrode at a faster pace than do larger fragments. At the end of the process, we observe bands on the gel corresponding to different sized of DNA.
By running many different samples, one is able to compare the differences in the samples.