When self-sign up is enabled for a group, students are able to switch groups. To prevent students from switching groups you can disable self sign-up at any time.

If a group has a student leader, the leader will be able to manage group memberships through the course People page regardless of self sign-up settings. However, student group leaders cannot change the number of members allowed in a group.