By default, documents are sorted by modified date, descending order, so the latest modified documents will be shown on the top of the page.
To change the documents’ sort order, click on any of the documents’ column headers or click on the sort-menu, on the top right corner of the page, where you select which column to sort on and in which direction you want to sort (ascending or descending):
The documents will then be sorted by the column.
An arrow will be presented, to the left of the column, showing the sort order, in this case ascending.
If sorting by clicking on the column header, toggling on the column will change the sort order to descending and change the direction of the arrow.
Any conducted sorting will be added to the URL of the page, so after having conducted a sorting, maybe combined with a filtering, you can bookmark the page or easily share this sorting/filtering with others by sharing it to an e-mail or to a page on an intranet.
Managed metadata, choice and people columns can be sorted, but if they are configured to allow multiple values, they cannot be sorted as it is not possible to sort on a column that has multiple values.
If you have conducted a free-text search, the columns will not be sortable, as there are certain constraints in sorting searched items.