Bubble sort is an algorithm that compares adjacent elements and swaps them if they are in the wrong order, with the lightest element rising to the top with each iteration. It works by comparing pairs of adjacent items, swapping any that are out of order so the lightest rises to the left side, then repeating for the next pair. This process continues until the list is fully sorted from lowest to highest value.