The most effective way I have found is time out. Cats really hate closed doors and it only takes 3-5 minutes closed in a room to get the idea across. All you have to do is pick them up quietly (It is hard not to reprimand vocally, but this just makes things worse.) and place them in a small, boring room. Let them out in a few minutes. Repeat whenever they misbehave. You should also be sure to give positive feedback like treats or petting when they do things right. It takes 3 to 6 weeks to "extinguish" a behavior if the message is absolutely consistent. Add time to this every time you don't follow through with training and add time for older animals. Be aware that the behavior may get worse just before it goes away. It is normal for this pattern to happen.
This method has worked miracles even with very aggressive cats. Cats are not hard to train, but they often do not respond well to physical or vocal negative feedback.
Letrisa Miller, is a Feline Veterinarian