DNA separation takes place due to the mesh-like nature of the agarose gel. Smaller DNA fragments can go rapidly through the pores, while larger fragments get caught and consequently tour slowly.
Agarose gel electrophoresis is used to resolve DNA fragments on the groundwork of their molecular weight. Smaller fragments migrate quicker than larger ones; the distance migrated on the gel varies inversely with the logarithm of the molecular weight.
These DNA size requirements can be used as high-quality controls for electrophoresis and for determining the sizes of unknown DNA fragments.
Learn more about DNA here: