Insertion sort is an O(n^2) sorting algorithm that builds up a sorted array one element at a time. It works by taking the first unsorted element and inserting it into the correct place in the already sorted portion of the array. This requires linearly searching the sorted portion and shifting elements over to make space. Each pass increases the length of the sorted portion by one. While O(n^2), insertion sort performs better than other quadratic sorts like selection sort on arrays that are already partially sorted.