Bubble sort compares all adjacent values in an array from beginning to end. If compared values are out of order it swaps them. It repeats the process until it goes through the entire array without doing any swaps.
You won't find Bubble Sort used in libraries because it's so inefficient. Its only upside is the simplicity to write it. Because of its simplicity it is used to teach the basics of sorting.
Array – Values