This video from Addgene explains how to excise a DNA band from an agarose gel. This protocol begins after our DNA has been prepared and separated using agarose gel electrophoresis.
Gel purification allows you to isolate and purify DNA fragments based on size. Following gel electrophoresis, you can cut DNA bands out of the agarose gel and purify the DNA samples. This is a commonly-used technique for molecular cloning, such as PCR- or restriction enzyme-based cloning.