Binding off is how most projects are finished. It turns all the "live" stitches on your needle into a neat edge that won't come undone.
While usually binding off is done using the knit stitch, it can also be done in purl, or in a combination of knits and purls.
bo - bind off
psso - pass over
BINDING OFF NORMALLY
Knit 2 stitches.
Using your needle (or your fingers), bring the first knit stitch (the one on the bottom) on the right needle over the second stitch (top stitch) and off the needle. This is called a pass over.
You have bound off one stitch! To continue:
Knit one stitch.
Repeat steps 2 & 3 until there is only one stitch left on the right needle and none left on the left needle, ending after completing a pass over.
Cut your yarn, leaving a long enough tail to weave in later, and thread it through the last stitch. This is called fastening off.
BIND OFF IN PATTERN
When a pattern says to "bind off in pattern" that means to work your stitches as they are, knitting the knits and purling the purls as you bind off.
You would still follow the same binding off sequence as above, just replacing instructions to "knit" with "work," which means to knit or purl, depending on what the stitch is:
1. Work 2 stitches.
2. Pass over.
3. Work 1 stitch.
4. Repeat steps 2 & 3 until there is one stitch left, ending after completing a pass over.
BIND OFF PURLWISE
Follow the steps above for binding off normally, replacing all instructions to "knit" with "purl."
BIND OFF IN THE MIDDLE OF A ROW OR ROUND
It's simpler than it sounds. The only important difference to remember is that you must work two stitches before doing your first pass over.
So if a pattern tells you to "K20, bind off 5, k to end," you would knit 20, then knit 2 more, then do your first pass over, then repeat [knit 1, pass over] four more times, then knit to the end of the row.