Part 1: Agarose gel electrophoresis
Agarose gel electrophoresis is the technique to separate DNA fragments according to their size in the presence of the electric field.
Part 2: Migration of DNA bands
DNA carries a negative charge, in the presence of an electric field it migrates towards a positive electrode, that is, anode. Therefore, DNA samples are loaded at the cathode, that is, at the negative electrode.