That's why group swimming lessons are so effective for children learning to swim. They get some fun interaction with their peers, they can experience faster development by watching others, some children are more likely to overcome anxiety in a group class and they can be rewarded through peer / teacher / parental praise in a group environment. In the school aged classes group classes allow a student to complete independent laps - giving them an opportunity to experiment with their new skills and to learn through their own problem solving as well as their teacher's instruction.
Private lessons have their own benefits too. Private classes are a great opportunity to increase confidence, increase and trust and the friendship between your instructor and your child and a great opportunity to work on individual skills that your child may require to progress further in a group class.