In hemoglobin electrophoresis, a blood sample is placed on a gel and subjected to an electric field. The hemoglobin molecules, which are charged, migrate through the gel at different rates depending on their size, shape, and charge. By comparing the migration patterns to known standards, different hemoglobin types can be identified.