By "Groups" you're probably referring to the option that groups categories in the command list (you'll see gray headers with the category name in the command list that can be collapsed or expanded).
First you need to create a category by editing a command, and entering a category name in its "Category" field. Then, click the second icon to the right of the "Import Commands" button on the bottom left of the "Edit a Profile" window (If categories are not grouped, the icon will look like a single rectangle).
It is not possible to assign multiple commands to a category simultaneously, so you'll have to edit each command to set its "Category" field.
Note that you can use that field as a dropdown to choose any existing category (though copy-pasting can still be faster than using that).