The big idea in plain words
Intervals are calendar blocks, each with a start and an end. Line them up by start time and walk left to right, gluing together any block that begins before the previous one finishes. Sorting first is the whole trick - it turns 'do any of these overlap?' into one quick neighbour comparison.
Example: [1, 3], [2, 6], [8, 10]. Sorted by start, compare [1, 3] with [2, 6]: since 2 is not after 3, they overlap, so merge them into [1, 6]. Then [8, 10] starts after 6, so it stands on its own. The result is [1, 6] and [8, 10] - cleanly merged in a single pass.