Gel electrophoresis separates molecules like DNA and proteins based on their size and charge. Agarose gel electrophoresis is commonly used to analyze DNA fragments. Samples are loaded into wells in an agarose gel submerged in buffer solution. When an electric current is applied, negatively charged DNA migrates toward the positive electrode at rates inversely proportional to its size. Staining the gel with ethidium bromide allows visualization of DNA bands under ultraviolet light. This technique can determine the presence and size of DNA fragments like PCR products.