Merge sort is an algorithm that splits an array into halves, recursively sorts the halves, and then merges the sorted halves into one sorted array. It has a time complexity of O(n log n) in all cases and requires auxiliary space of O(n). The algorithm works by recursively splitting an array into halves until each subarray contains a single element, which is trivially sorted. It then merges the sorted subarrays back together into a single sorted array.