Bubble sort is a simple sorting algorithm that works by repeatedly swapping adjacent elements if they are in the wrong order. It has a worst-case time complexity of Θ(n2) but works best on nearly sorted lists in linear time. The algorithm makes multiple passes through an array, swapping adjacent elements that are out of order until the list is fully sorted.