Electrophoresis is a method used to separate charged molecules, such as DNA, RNA, and proteins, based on their size and charge. In gel electrophoresis, molecules are separated in a gel matrix under an electric field. Capillary electrophoresis offers higher resolution and efficiency by using a thin capillary tube. These techniques are fundamental in genetic research, forensic science, and protein analysis.