Use the Group command to unite objects that you want to keep together as one unit. You can group individual objects as well as already-grouped objects. When you no longer want to keep a group together, separate the original objects with the Ungroup command.
When you apply a command to a group object, the effect in most cases is the same as if you applied the command to each object in the group individually.
After you group objects, you can select individual objects in the group with the Direct Group Selection tool.
Grouping objects can change the stacking order of the objects relative to objects outside the group; e.g., you have three overlapping objects. If you group the front and back objects, the group moves to the back and the middle (not grouped) object becomes the front-most object.
The square is behind the triangle, which is behind the circle in the stacking order
After selecting the square and circle and grouping them, the group goes behind the triangle in the stacking order