It scans down the image -- down rows in column 1, then move over to column 2 and go down the rows in column 2, then move over to column 3 and go down the rows in column 3, etc. Whenever it hits a "true" pixel, it does a region growing process to give all the pixels that same ID number (label), regardless of how far over to the right it goes.
So basically go over column by column seeing where the left edge of the blob is. If the blob touches that column, make the whole blob have 1 number. Then start scanning again and when you hit the next blob, assign that whole blob the next number (one more than the previous number).