The theory of the Looking-glass self states that your perception of yourself is an amalgam of how you feel others perceive you. In other words, we define ourselves by how we think other people define us.
The main components of the theory are that we have an image of how we must seem to others, and interact with other people based on how we feel perceived, and then that sense of judgement is reinforced by those interactions.
It is postulated that that the younger the person, and the closer the relationship to the person judging him/her, the more powerful the looking-glass self effect will be. In the case of a parent frequently calling their child "stupid", the effect would be significant.
Over time, the child would come to define himself through the treatment of his parent. He would develop the idea that his parent thinks of him as stupid, and would come to define himself as stupid and conform to that role, at least within his interactions with that parent.