Merge sort divides an array until each run has one item. On the way back, it compares the heads of two sorted runs and writes the smaller item to the merged result.
Repeated splitting and merging gives O(n log n) time. A typical array implementation needs extra space for the merged output.
When to use
Use it when stable ordering or predictable time across input sizes matters.