Summarize this article:

Positive reinforcement is a much more effective way to train your cat than using punishment. To get the most out of positive reinforcement training, make sure that you identify what your cat would like best as a reward. For example, if your cat loves to be pet, then pet her as a reward. If she has a favorite treat, then offering a couple of treats might be the best motivation. Just as it is important to use the spray bottle right when your cat is doing the undesired behavior, you also need to reinforce the positive behavior right away. Otherwise, your cat will not know why you are rewarding her. For example, if your cat is using her scratching post instead of your sofa to scratch her claws, then reward her while she is using the post, not after she finishes. Reinforcing your cat’s good behavior once will probably not be enough to get her to understand what you want her to do. Instead, you will need to reward her good behavior every day to help her understand what she is supposed to do. Try to watch your cat for a little while every day to identify good behaviors that you can reward. While you may be tempted to yell at your cat, throw something at her, or hit her when she frustrates you, resist this urge. It will not solve the problem. In fact, it may make matters worse because your cat may become fearful of you and start avoiding you. If your cat does something you don’t want her to do, simply spray her once or clap your hands loudly to get her attention. Then, make sure that you reward her for stopping the unwanted behavior.
Reward your cat when she does something good. Acknowledge good behavior right when it happens. Reinforce good behavior every day. Skip the punishment.