To understand how modeling works, we must distinguish between learning and performing. However, whether a person actually performs the learned behavior depends on the consequences at the time of the performance.
Bandura (1965) demonstrated this distinction between learning and performing with his classic Bobo doll study. A Bobo doll is a life-size, inflatable plastic figure that is weighted so that it bounces back after being knocked down.
Children were shown a film in which an adult hit or kicked a Bobo doll. There were three versions of the film that differed from each other in their different outcomes. In one film, the adult's behavior was rewarded, in another version it was punished, and in a third there were no consequences. Children were divided into three groups, and each group was shown one of these versions.
When the children were placed in the same room as the Bobo doll, those who saw the aggression being punished were less aggressive than those who saw the aggression being rewarded or ignored.
When all the children were offered a reward for punishing the doll by hitting or kicking it, it turned out that all the children had learned the behavior of the adult from the film.
The key to the research is that children resort to punishment if they receive a reward for doing so at the moment of making the decision.