This demonstrates knitting a band of garter stitch onto a body of stocking stitch. The same method can be used to knit on any kind of edging. The technique is also used in entrelac knitting.
See also this alternative method.
Shown with a cast-on count of 18 stitches.