Changing a learned behavior is not easy. But what has been learned can be changed. It takes consistent, positive, reinforcement. Also realizing that a behavioral change will not happen overnight is important. The quick punishment or reward seldom works. It can take 3 or more weeks of consistent, positive reinforcement. And, of course, it also depends on the age of the person - since the older they are, the more control they have.
What is also very important is to realize what the child has actual control over. For example, a child with ADHD, has a lot less impulsive control then a child without that condition. Thus, the ADHD child would need different techniques then a child without ADHD. However, the techniques that work for the ADHD child would probably work for most kids simply because they consist of a lot of little, positive, consistent steps.
It really is a kind of complicated subject since all kids are different. I mean books have been written on the subject. Ones I would recommend are Love and Logic by Faye and Cline, "SOS Help for Parents," by Lynn Clark, One, Two, Three, Magic by Dr. Phelen.
For me, the key was looking ahead and predicting difficult behavior, and creatively working to head it off in a fun and positive way. Making it fun to behave. For examples, we had a thing where the kids would focus on not changing the expression on their faces when they got vaccinations. I told them I was the champ, that no one could do it as well as I could. I said if you're just looking at my face, you can't tell when I'm getting the shot. Well they all tried that too, and nurses giving injections were amazed at how my children didn't fuss at all. At all. And afterward, they were proud - and I'd say wow your face didn't change expression AT ALL!! (even thought it kind of did a little).
When one of my kids had deplorable table manners (disgusting, he was about 8), I told them I would put up a video camera, and we'd watch the video of dinner together and each kid could decide how good his manners were watching the video, and then decide how much of a delicious eclair he deserved for dessert based on his manners. WOW! Turns out, my child COULD eat in a nice way, and he was hard on himself for a very few errors. At least I knew then he was capable of eating nicely.
Another time, we had a playgroup Christmas gift exchange. Kids would bring $5 gifts and then draw numbers and each open their item. It was always horrid - why did we do that? - everyone was jealous and it ended in a few kids behaving very ungraciously each time. So this is really genius, if I do say so myself. ;D I told my kids that we were going to have the exchange, and there would be wonderful things opened, and pay attention because I hadn't done their stocking shopping yet and if they saw ANYTHING AT ALL they wanted that another kid opened, please tell me later and they would get that item in a stocking. But don't tell anyone, so no one else would be jealous. Imagine the sweet behavior that inspired - when each kid opened a gift, my kids would look at it enthusiastically, and then sweetly sit back down. It was only years later that I told the other moms - when one of them complimented me in how sweet and gracious my kids were, what I had done. Hahaha.
What I learned otherwise, if they had a behavior problem, is asking them for help in ideas to solve it, and enthusiastically saying "I think you can do this".
Here is one that I think often gets overlooked but can be very effective. Selective ignoring. This work in two ways. First, for any attention seeking behaviors, it takes the giving attention element away. There have been times my eyes wanted to get really big, I wanted to let my voice get louder but have controlled both so as to let the moment pass and not have my kids KNOW that what they are doing is getting under my skin. When they were little, it was the flopping on the floor to get my attention. When they are older, it is slamming a drawer in the kitchen or stomping through a room. Unless I need to go there, I let the moment pass. And most of the time it does and I haven't set up negative communication methods to express not being happy. That's just an example
The other reason I like selective ignoring is because there is such a thing as over correction in my opinion. If everything is an offense worthy of mom saying something, then everything becomes the same. And mom says something about EVERYTHING. So, I really allow some things to slide that aren't a big deal. And hey, once you conquer one thing that you are wanting to correct, you can move on to something else that you let slide.
I think of the bucket method-- bucket A. Dangerous things that require immediate attention. Deal breakers that can NOT happen in your home. Bucket b. the things you are working on because they aren't desirable behavior. But they do not have the intensity as bucket A. And C. The little things that annoy you as a parent that you let slide. There really needs to be a good deal in bucket C and not everything treated like bucket A. Just my opinion, but some very good parenting guru's coach this method of deciding what to discipline and react to and what not.
My kids do really like to be given praise as well. I'm heavy on the praise when deserved. I do far less rewarding than I did when my kids were younger when a couple of spare coins pleased them or they get to choose the family movie . . . now I work with that sense of wanting people to think they are mature, people to be proud of them, being noticed for being good, kind or whatever the word is that you are using that day for the praise. My kids really respond to this.
Natural consequences. This is something straight out of Love and Logic. It's very easy to rescue kids from the consequences from their actions. Because we care so much, we want to fix their problems. But then they learn nothing. So, I've seen my sons not pack their bag properly for their day at school which I've reminded them over and over to do and then notice that they've left something out and it's not in the bag. Sadly, they may get a late mark on it . . . which my studious kids hate . . . SO, after that natural consequence . . . they are more apt to pack that bag right so they get all of their things in there. If I had run the paper out to them, they'd miss that lesson. A few points off of an assignment is worth the lesson.
I could give you a hundred examples of the lessons natural consequences have taught my kids. Really, a better teacher than me. :>)