Gel electrophoresis of proteins acts in a similar manner to DNA electrophoresis, in that electrical currents are used to separate proteins of different properties. (If you aren't familiar with DNA electrophoresis, you can find the expii topic here.) We'll cover two different methods related to protein separation using electrophoresis: isoelectric focusing (IEF) and SDS-PAGE.
Isoelectric focusing (IEF) takes advantage of the fact that a protein's charge is dependent upon the pH of its surroundings. Recall that a negatively charged protein will become neutral as the concentration of hydrogen ions increases around it (i.e. the pH decreases). In IEF, scientists create a special polyacrylamide gel with a pH gradient. That means that one end of the gel will have a high pH, and the pH will gradually decrease until it reaches the other end of the gel.
Then, when a current is run through the gel, proteins migrate to their isoelectric point (pI). The pI of a protein is simply the pH at which it is neutral. Once all the proteins have ceased to migrate, they are now separated by charge. (See image below.)
The next step is SDS-PAGE. The acronym consists of two parts: SDS stands for sodium dodecyl sulfate, which is a type of detergent. Detergents are amphipathic molecules (meaning they typically have both a negatively- and positively-charged end) that are able to bind to a wide range of substances. PAGE stands for polyacrylamide gel electrophoresis, the same procedure you might use to isolate DNA strands from one another. Ultimately, SDS-PAGE allows us to separate proteins based on mass.
The SDS step is important to ensure that proteins are unfolded (or denatured) when they are run through the polyacrylamide gel. Otherwise, factors besides the mass of the protein would affect the length of the gel the protein runs. For example, a highly compact protein 90 aa (amino acids) in length may run further down the gel than a loose 70 aa protein; denaturing the proteins allows us to ensure that proteins are properly separated based on size. SDS also gives the protein an evenly negative charge.
After treating the proteins with SDS, scientists can run the proteins through a polyacrylamide gel. The smaller proteins will be less constricted by polyacrylamide polymer chains and will travel far down the gel, and the larger proteins will be "stuck" near the top of the gel. After this process is complete, scientists visualize the protein's location. Typically, they use a stain called Coomassie blue. This means that wherever there is protein in a final gel, a blue band will appear.
Using both IEF and SDS-PAGE, scientists can construct a 2D map that precisely shows a protein's mass and charge. In the above example, proteins with a pI between 4 and 7 and mass between 97 kD (kiloDalton) and 14 kD are separated.