How to Cast Off
I've talked to more than one beginner knitter who told me about the super long scarf they made because they didn't know how to get it off the needles so they just made it longer and longer. That's where casting off, also called binding off, comes in.
Also called Binding off, abbreviated as BO. Knit two stitches. * With your left needle, lift the stitch farthest to the right on the right needle over its left-hand neighbor. You now have one stitch on your right needle. Knit another stitch, and repeat the process from the *. Knittinghelp.com has knitting videos on casting off/binding off.
Casting off purlwise
Sometimes a pattern will say Cast off purlwise, Cast off pwise, or maybe BO pwise. This just means that instead of knitting the stitches as you cast off, your purl them. Use the casting off instructions for the basic method (above) but purl instead of knit. The reason for this is mostly the way it looks. You'll see that your cast off edge looks different on each side.
Most patterns use the basic knit or purled bind off. But there are other styles of binding off which are handy for different looks or uses.
Sewn Bind Off
I often use this method. It makes an almost invisible, flat, bound off edge that looks the same on both sides, and goes well with garter stitch. For example, I use it in the Fifth Street Jacket on the collar. It's not difficult, but you will need a tapestry needle. I find it takes a little more time than the basic cast off. I like the bind off instructions at knittingdaily.com for the sewn bind off.
Three Needle Bind Off
This is a great method for joining two sets of stitches together. I sometimes use it for shoulder seams instead of sewing. It's also great for joining the top of a hood together, like in the Sweet Oak Cardigan. It's similar to the basic bind off, but you hold 2 needles in your left and 1 in your right hand.