Such knowledge is probably gained in several ways. One process undoubtedly operates through social comparison of success and failure experiences. Children repeatedly observe their own behavior and the attainments of others
Social foundations of thought and action: a social cognitive theory (ed. Prentice Hall, 1986)