Quicksort is a divide and conquer algorithm that works by partitioning an array around a pivot value and recursively sorting the sub-partitions. It first chooses a pivot element and partitions the array by placing all elements less than the pivot before it and all elements greater than it after it. It then recursively quicksorts the two partitions. This continues until the individual partitions only contain single elements at which point they are sorted. Quicksort has average case performance of O(n log n) time making it very efficient for large data sets.