In bubble sort there is a comparison between two adjacent elements and then if the values are not in order then swapping takes place. The process takes place until no swapping is needed. This is called bubble sort because as the bubble pops upto top in water the smaller elements also pops up to top.
Lets take an array:
A[4,2,9,3] sort in ascending.
Step 1: [4,2,9,3]- here the first two elements are compared and swapped. New array [2,4,9,3].
Step 2: [2,4,9,3] the next pair is not swapped as they are in order.
Step3: [2,4,9,3] the last two elements are swapped. New array [2,4,3,6].
Now we have to do one more iteration as the array is still not sorted.
Now the array is sorted and no need to have more iteration.