IBM interview question

Explain the bubble sort works?