Grouping helps to divide all data on collections each of which has something common. To sort the entries inside the Library, go to Library Settings, tap More submenu and choose Group item there:
You can choose the field to group entries by here. Note that all aggregations added to this Library will be calculated for each group.
To remove grouping, go to Library Settings, tap More submenu, tap Group item and choose No grouping option there.