AT&T interview question

How do bubble sorts work?