Young children are basically good. Furthermore they want to please their parents. When you praise them for their good behaviour by telling them that Papa and/or Mama is happy with their action, you are using positive reinforcement. Unfortunately many parents ignore their child's good actions and only comment on the bad actions. Let us take an example.
Iman is three years old and has a baby brother, Samir, who is one. She gets out her blocks to play with and of course Samir crawls over to get involved. She gives him a red block and then proceeds to build a tower. Samir grows tired of his one block and tries to get more. In the process he knocks down the tower. Iman reacts angrily and grabs all the blocks and tells her brother that he can't play with any of the blocks. Her mother hears her and shouts at her angrily, "Iman you are a bad girl not to share with your brother. Give him some blocks!
Iman did two actions concerning her brother: 1. She gave him a block and 2. She took the blocks away. She received attention from her mother for the bad actions. This teaches her that if she wants attention from her mother, she should NOT share.
How else could the mother have handled it? If she had praised Iman when she first shared ("Iman, what a nice sister you are, to share with your brother. I'm so happy to see you do that."), then Iman would remember that her doing ‘good’ resulted in her mother's attention. When her brother knocks over her blocks, her first inclination will probably be to grab all the blocks but if her mother is there to console her and encourage her to try again ("Oh Iman, it's too bad that Samir knocked over your blocks. He was trying to play with you, but he is too little to be good at making towers. Why don't you build a little tower for him to play with, and then you can build a big one for yourself."), then she will happily give him more blocks. She will want to share next time as well because that action got her mother's attention.
~ Teaching your Child about Islam, Freda Shamma PhD ~