There are a few different types of bind offs, but the most common is the basic knit bind off. To do this, you simply knit the first two stitches together, then knit the next stitch and pass the previous stitch over it (as if you were binding off in purl). Continue until you have one stitch left on your needle, then cut your yarn and pull it through that last stitch to secure.
Cast off is very similar to binding off, but there are a couple of key differences. First, when you cast off in knit, you always slip the first stitch purl-wise (with yarn in back) before knitting the next two together. This creates a neater edge than justbinding off inknit alone. Second, when you come to the last two stitches on your needle, you knit them together as usual but don't pass one over the other; instead, just leave both stitches on your needle and turn your work so that the wrong side is facing you. From here, all you need to do is bind off in purl (again slipping that first stitch purl-wise with yarn in back), and voila - you're done!