For example, you might have a user who belongs to group X, but needs to have access to the few extra options (such as attaching files to posts) given by group Y. You can make X this user’s primary group and make Y a secondary group.
If a user is in multiple usergroups that have conflicting permission settings, the “greater” permission overrides the “lesser.” A Yes always overrides a No, and a larger number overrides a smaller one.
If 0 represents “unlimited” or “no” restriction, it overrides all other settings.
Be careful when you put a user in a secondary group that you also use as a primary group. You might edit the group and inadvertently give the secondary user more permissions than you originally meant to!