What is the importance of peers in middle childhood and adolescence? Is there a difference at each stage of development?

What is the importance of peers in middle childhood and adolescence? Is there a difference at each stage of development? What effect does interaction with peers have on an individual’s cognitive and socioemotional development?