In hemoglobin electrophoresis, a blood sample is first treated to release hemoglobin from red blood cells. The sample is then placed on a gel, and an electric current is applied. Hemoglobin variants move at different rates due to their unique sizes and electrical charges, creating distinct bands on the gel. These patterns are then compared to those of normal and known abnormal hemoglobins.