To bind off while knitting, knit or purl two stitches, depending on what the pattern dictates. Loop both stitches onto the right-hand needle, and pick up the first stitch with the tip of the left-hand needle. Lift this stitch up and over the second one and also over the tip of the right-hand needle. Repeat this process until the piece is fully bound off, then secure the binding by tying the end-piece of thread into a knot.
The two new loops that you create from the left-hand needle at the top of the row form the beginning of the binding. This initially puts two loops on the right-hand needle. Place the left-hand needle in front of the right-hand needle, and loop it through the first stitch that you created on the right-hand needle. When you pull the first stitch over the second, you are left with one stitch on the right-hand needle.
Knit or purl another stitch, and repeat this process until the right-hand needle has one stitch, and the left-hand needle has no stitches. When you are ready to finish the binding, cut the thread a few inches from the needle, pull the tail through the last loop, and tie it into a knot to secure it. You can modify the basic binding off process by using alternating knit and purl stitches when you are working loops off the left-hand needle.