Heaps are nearly complete binary trees stored as arrays that satisfy the heap property: for max-heaps a parent node is greater than or equal to its children, and for min-heaps a parent is less than or equal to its children. Heap operations like insert, extract max/min, and increase/decrease key take O(log n) time due to the heap's height. The heapsort algorithm uses a max-heap to sort an array in O(n log n) time by repeatedly extracting and placing the max element in its final position. Priority queues implemented with heaps support insertion, maximum/minimum extraction, and key increases/decreases in O(log n) time.