Moodle enables you to assign the students and teachers in a class to different groups.
Groups are created under Course administration | Users | Groups. For each activity in a course, the teacher decides whether the groups will be used. In other types of activities, groups are used to prevent students in one group from seeing the work done by students in another group. In an assignment, groups work a little differently. In an assignment, groups enable students to submit their work together as a group. They can also be used to assign students to specific teachers, while they are all using the same course. For more about groups, refer to Chapter 12, Groups and Cohorts.
In an assignment, setting Students submit in groups ...