First of all, what is a product group? sometimes, in a collection, it is needed to group products together, such as two parts of a swimsuit. To do that, you can use the product grouping tool.
Create a product group by dragging a product to the groups list. continue adding products to that group.
A product that it's magnet is on (blue) will cause the group to form in the collection next to that product.
For example, in a group of products A and B, product A is a magnet, and product B is not a magnet.
Product A will cause product B to arrange next to it, while product B will NOT cause product A to arrange next to it.
In a group, products are magnets by default, unless you unmagnet them by pressing the magnet button.
The group will form in a collection according to its order in the group. you can change that order by dragging and dropping products in that group.
The group will display in a collection based on the location of the product with the highest position according to the sorting strategy of the collection.
For example, in a collection that is sorted by sales quantity and has a group of products A and B, product A is a best seller and its position based on its sales is #1. Even though product's B position should be #70 (based on its sales), product B would be displayed next to product A (according to the group's order).
In a case in which 'push down out of stock' option is activated, the group will be displayed in the collection based on the position of the highest ranked product (within the group) that is in stock.