The most common use for the technique is when working stranded color patterns, in which two yarns are alternated to certain of the stitches to create patterns. Weaving is used to attach the horizontal strands of yarn that pass unused behind stitches formed with the other yarn to the inside of the fabric. This is usually done to prevent overlong "floats" on the inside to prevent snags and create an even tension in the fabric.
The technique can also be used for decorative purposes if it is done on every stitch, in which case the "inside" of the fabric is used on the outside
Weaving in, or "inlay", is a related but different technique that is used to thread an extra yarn(s) into the fabric without knitting it. The woven yarn(s) need not be the same thickness or color as the knitted yarn, and almost always (but not necessarily) follow the horizontal rows (courses) of knitting. Because the extra yarn simply passes back and forth between the knitted stitches, it can be pulled out unless it is secured in some way at the sides. The resulting fabric is more like a woven texture than a knit because the extra strand reduces its elasticity.
To weave in for stranded color patterns, the yarn being used to form stitches is passed first below and then above the other as it is wrapped around the needle, which catches the yarn not in use against the inside of the fabric.
For the Inlay method of weaving the extra yarn(s) is passed in back or in front of each stitch as it is knitted, similar to the slip-stitch knitting technique.
In another technique, dip stitches are used to secure the woven yarn(s). The method may be necessary if the woven yarn(s) are much thicker than any one row of knitting.
Weaving has at least two other meanings in knitting. First, weaving in the ends of the yarn means burying the free ends of the yarn(s) in the knitted fabric to secure them, by passing them in and around the stitches. Second, weaving is sometimes used as a synonym for grafting.