Merge sort is an algorithm that sorts a list by dividing it into halves and then merging the sorted halves together. It works by first splitting the list into individual elements, then repeatedly merging the sorted pairs into larger sorted groups until the entire list is sorted. The algorithm runs in O(n log n) time since each merge takes linear time and there are log n levels of merging.