Agarose gel electrophoresis separates DNA fragments according to their size. Typically, a DNA molecule is digested with restriction enzymes, and the agarose gel electrophoresis is used as a diagnostic tool to visualize the fragments. An electric current is used to move the DNA molecules across an agarose gel, which is a polysaccharide matrix that functions as a sort of sieve to help "catch" the molecules as they are transported by the electric current.
For proteins, sodium dodecyl sulfate (SDS) is an anionic detergent applied to protein sample to linearize proteins and to impart a negative charge to linearized proteins. This procedure is called SDS-PAGE.
Once protein bands have been separated by electrophoresis, they can be visualized using different methods of in-gel detection. The choice of staining technique depends on the availability of imaging equipment in the lab in many cases.
Sigma-Aldrich protocol for ProteoSilver™: High Sensitivity Silver Stain for SDS-PAGE
The western blot (sometimes called the protein immunoblot) is a widely used analytical technique used to detect specific proteins in a sample of tissue homogenate or extract. It uses gel electrophoresis to separate native proteins by 3-D structure or denatured proteins by the length of the polypeptide. The proteins are then transferred to a membrane (typically nitrocellulose or PVDF), where they are stained with antibodies specific to the target protein.