Sorting affects ordering of messages in the Message list.
There are basic sorting criteria, such as by date, subject, sender, etc.
And there’s also advanced sorting mode called Threaded sorting.
Sorting by message threads is done after primary sorting is done.
Thread of messages is logical ordering of related messages, utilizing fact that email messages may refer to other messages being replied to. The sorting use message attributes called Message-ID.
Message threads are shown in message list as a tree list, where some messages have expand/collapse arrow at left side. Clicking the arrow expands or collapses thread. The thread shows logical flow of messages as they were replied.
If viewing combined folder in the message list, threads are constructed from all messages of all folders shown in the list.