This article is from the Problem Behaviors in Cats FAQ, posted to rec.pets.cats newsgroup. Maintained by Cindy Tittle Moore with numerous contributions by others.
For unwanted scratching, provide an approved scratching post or other item. Issue firm "no!"s on unapproved items. You may wish to spray Bitter Apple or Bitter Orange (available at most pet stores) on items that they are particularly stubborn about. Praise them and give a cat treat when they use the approved scratching material. Demonstrate how to use the post by (yes) going up to it and scratching it like your cat would. They will come over to investigate your scent and then leave their own.
Pepper (black, white, or cayenne) can be applied to furniture and plants to discourage scratching. This does not deter all cats. You can also cover areas with double-sided tape (sticky on both sides) to discourage unwanted scratching. (Always be sure to provide an alternative scratching item.)
In general, cats will either use a post a lot or never use it. The deciding factor can be the material that the post is made out of. It has to be fairly smooth (cats usually don't like plush carpet) and shouldn't be a material that their nails get stuck in. Once that happens, they may not use the post anymore. Natural fiber rope wrapped tightly around the post appeals to many cats. Some cats like plain wood; a two-by-four made available may work well. Other cats prefer the kind of "scratching posts" that are horizontal rather than verticle.