The answer is electrophoresis. The electrophoresis can separate different length of DNA fragments using the agarose gel. The principle is that the DNA has negative charge and under constant volt it will move from negative to positive. And the longer the DNA is, the slower the DNA runs.