The merge sort algorithm works by recursively dividing an unsorted list into single item sub-lists and then merging those lists back together in a sorted way. It divides the target list in half repeatedly until all sub-lists contain one item. Then it merges the sub-lists back together two at a time, comparing the items in each sub-list and choosing the smaller item to build a new sorted sub-list, until the entire list is merged back in sorted order. This has an efficiency of O(n log n) time complexity because the merging step takes linear time but only needs to be done log(n) times.