Grouping helps players stay together when battling or travelling to a new area. When you join a battle, there will be spots reserved for your other group members if they are travelling with you in the same area. They will be asked if they want to join your combat. If so, they will be teleported to your battle. A reserved spot that you see in the world may be for someone in your group or for a different group.
To invite someone to join your group, click on them and this will open your Friends Panel. There you will see the option to Invite to Group.
Now that you're in a group, you will see a new Group section to your Friends List. You can leave a Group at any time by clicking the Leave Group option on the Group section of the Friends panel.