Heap sort is a sorting algorithm that uses a heap data structure to sort elements in ascending or descending order.