Let Scratch show you how a Bubble Sort works. Just run and watch.
This is a solution to Rosetta Code's "Bubble Sort" task. http://rosettacode.org/wiki/Sorting_algorithms/Bubble_sort