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 simply allocates participants to any combination of groups, e.g., different class groups.
These groups can then be allocated to various Groupings (sets of groups) in order to allocate different resources/activities.
You cannot having Groupings without first creating Groups.
In the Advanced section of Resources and Activities you can make it accessible to some Groupings and not others.