Please watch the following demo or follow the steps listed below to create groups in a Moodle course. The video demo includes information on creating groupings as well.
Watch Demo
Setting up groups in Moodle is accomplished in two steps. The steps are outlined below:
Step 1: Turn on Groups for the Course
First, the course must be set to use groups. Go to the Administration block and select Settings.
In the course settings, scroll down to find the section titled Groups.

From the drop-down menu, select the Group mode desired. There are three modes. This example uses Separate groups.
No groups: there are no subgroups; everyone is part of one big community
Separate groups: each group can see only its own group; others are invisible
Visible groups: each group works in its own group but can also see other groups
Scroll to the bottom of the page and select Save changes.
Step 2: Create and Populate the Groups
To create the groups, go to the Administration block and select Groups. Next select the Create group button, as shown by the red arrow.

On the next screen, enter a name for the group and select the Save changes button.

Next select the Add/remove users button (as shown by the red arrow) to populate the group.

On the Add\Remove user screen, add a user by selecting the desired name from the “Potential members” list and select the Add button. That person is then moved to the “Existing members” list for that group. Do this for as many people as you would like to add to the group.

Select the Back to groups button when you have completed populating all your groups.
For details on using groups with forums, please see the article titled “Using Groups with Moodle Forums.” If you would like to use groups with activities or resources, please see the article titled “Using Groups with Moodle Activities and Resources.”