Learning how to knit different stitches is only one half of the art of knitting; the other half is learning how to finish your projects. One of the major ways to finish a project is to produce a finished edge. Finished edges add stability and style to your work. There are three ways to knit an edge: selvedge edge knitting, cast-on edge knitting and sideways edge knitting.
Add a selvedge edge to any pattern by casting on two extra stitches on the initial cast-on. You can use selvedge-edge knitting as a method of producing a finished edge while you knit the body of the project; in other words, you don't have to cast back on to finish the edge. In this way, knitting a selvedge edge saves you time and yarn because you don't have to finish the edge after the fact.
Knit the first stitch, then knit the pattern as written, and knit the last stitch. If you want a garter selvedge, repeat this row over the length of the project, completing any increases or decreases within the selvedge stitches.
Slip the first stitch purlwise with the yarn in front, work the pattern as written, and knit the last stitch, if you want a chain-stitch selvedge (it looks like a crochet chain). Repeat this row for the length of the project, again completing any increases or decreases within the selvedge stitches. Note that if you slip the stitches knitwise instead of purlwise, you will end up with an edge that is more dense than a traditional garter selvedge, called a slipped-garter selvedge.
Alternatively, work a slip-stitch selvedge, to make chain loops along the selvedge edge. This selvedge is thinner than other methods. Do this by slipping the first stitch knitwise and knitting the last stitch; on the next row, slip the first stitch purlwise, and purl the last stitch. Repeat these two rows for the length of the project.
Pick up and knit stitches along the vertical edge of a completed work, perpendicular to the established pattern. You use this sideways-edge knitting technique when making heel flaps, button bands, neck edges, glove fingers, and hat bands amongst others. When you pick up stitches along a vertical edge, pick up one stitch for every two rows. So, if you are adding a button band to a cardigan that has 100 rows making up the front, you pick up 50 stitches along the vertical edge.
Insert the right-hand needle under the edge of the knitted fabric.
Wrap the yarn around the tip of the needle and pull through, leaving the new stitch made on the right hand needle.
Repeat until you have picked up the necessary number of stitches.
Work these stitches in whatever pattern you want, to your desired length, and bind off loosely.
Use cast-on edging to pick up the cast-on stitches of a finished work. You can do this by using a provisional cast-on method (casting on with waster yarn and then knitting the first row and subsequent rows with the project yarn), unravelling and putting the freed loops on the needle and knitting those, or by picking up the cast-on stitches as they sit regardless of how you casted on.
Pick up one stitch for each cast on stitch you made initially, so if you cast on 100 stitches initially, you would pick up 100 stitches to work your edge.
Knit these stitches in whatever pattern you want, casting off when you reach your desired length.
Choose an edge technique that fits your work. For example, a sideways edge can add additional stretch to the end of a hat, while a cast-on edge can provide a flare for the hat bottom of a cloche or fedora.
Make sure that you slip stitches as directed or the finished project will look different than described. Make sure that if you are picking up stitches that you pick up the correct number, otherwise your work might pull or pucker.