Scratching is one behaviour that causes many cat owners some grief. Scratching serves several functions for the cat, like claw maintenance, stretching muscles and tendons, and marking territory. Without declawing the cat, it's very hard to stop a cat from scratching. The easiest thing to do is to encourage the cat to only scratch certain items. It's important to start this early because cats will develop favourite scratching places.
Cats have personal preferences for the types of objects they'll scratch, so try to have a variety.
Adding a toy to a scratching post can also create interest. One thing not to do is take the cat and forcefully move its paws along the post. The cat will not like this and won't associate its natural scratching habits with the post. All cats will misbehave at some point, but punishing them must be done in a way to stop the behaviour, not cause more problems. Punishments like hitting, slapping, and shaking will not break a habit and it's cruel.