Amazon interview question

Algorithm: How does bubble sort work?