Agarose gel electrophoresis is the method to analyze the size of the DNA (or RNA) fragments. In the presence of an electric field, bigger fragments of DNA move through a gel slower than the smaller ones, producing different migrating "bands". Generally, these are visualized by soaking the gel in a dye (ethidium bromide) which makes the DNA fluoresce under UV light. This is the gel of choice for the DNA or RNA in the range of thousands of bases in length, or up to 1 megabase if you are using pulsed field gel electrophoresis.