Heap sort is a comparison-based sorting algorithm that uses a binary heap data structure. It first transforms the input array into a max-heap by calling the heapify function recursively on each node. It then extracts the maximum element from the heap and places it at the end of the sorted portion of the array. This process is repeated until the heap is empty. Heap sort has a time complexity of O(n log n) and requires only O(1) auxiliary space, making it an efficient in-place sorting algorithm.