Gel electrophoresis is used to separate out proteins or DNA by size. Both proteins and DNA have an overall negative charge, so an electric field is used to pull the proteins/DNA towards the positive electric terminal. The gel matrix they are being pulled through is somewhat thick, so small pieces will travel further than bigger pieces. The steps vary according to what type of electrophoresis you are doing (for example, you can use proteins in their natural state or you can denature them so they are all unfolded), but this is the basic procedure:
1. Assemble the electrophoresis apparatus. This consists of two glass plates, spacers in between the glass plates, and some type of box with a positive and negative terminal.
2. Pour the gel in a liquid form (can use polyacrylamide or agarose) in between the glass plates. Insert a well-comb in the top between the plates, at the negative end.
3. Wait for the gel to solidify.
4. Pull out the comb such that wells for your solutions are left behind.
5. "Load" your samples of DNA or protein into the wells of the gel (basically dips in the gel that hold the sample solutions)
6. Fill the apparatus with an electrolyte buffer.
7. Turn on the apparatus. This will create an electric field that will pull your protein/DNA down through the gel matrix towards the positive end.
8. Usually a tracking dye is added to the sample solutions. The dye molecule is very small, so it will travel ahead of your proteins/DNA. When it reaches the end of the gel, it is time to turn off the apparatus.
9. Separate the glass plates and carefully remove the gel.
10. Dyes can be added to view the "bands" of protein/DNA. Each band is a protein/DNA type of a different molecular weight, with the smallest proteins/DNA traveling farthest through the gel.
11. You can also add a molecular weight standard to one of your wells before running the gel. This is a mixture of proteins or DNA of known molecular weights. By measuring how far they travel (ie where the bands show up), and comparing to your unknown protein/DNA sample bands, you can calculate the molecular weight of the protein/DNA in your sample.
https://http://learn.genetics.utah.edu/content/labs/gel/gel_electrophoresis.swf