Note: You are currently viewing documentation for Moodle 3.3. Up-to-date documentation for the latest stable version of Moodle is probably available here: James Neill/Moodle/Groups.
Groups allocates participants to any combination of sets, e.g., different class groups.
Groups can then be allocated to various Groupings (sets of groups) in order to allocate different resources/activities.
In the Advanced section of Resources and Activities you can make it accessible to some Groupings and not others.