Formal or Informal?
In small-population virtual worlds, everyone knows everyone else and there is no need for formal grouping commands. If you want to create a group for whatever purpose, you chat to prospective members and there you have it, a group.
This is an informal group. The main problem is finding someone willing to do the organizing, rather than the virtual world’s lack of support for it. Informal groups arise in all virtual worlds. In small-scale ones, they’re all you need; when more players are involved, some notion of a group as a tangible entity usually surfaces.
If members of a group are to communicate on a special group channel, or are to accept mutual concessions (such as seeing one another’s basic stats or pooling experience points gained), or if the group as an entity is to possess anything (money, property), the virtual world needs to be able to reference that group. There must therefore be a formal process by which the group is created, which gives us the concept of formal groups. It is quite common for formal groups to be created from informal groups.
Note that it’s conceivable in either case for a group to have NPCs as members, although for informal groups the AI necessary to support it would be considerable.