You understand that pairs is a list of tuples.
Now, the second line is a list comprehension which is the equivalent of
sum_sq_diffs = 0
for a, b in pairs:
sum_sq_diffs += (a - b)**2
Now, while iterating through the individual elements, python would do a "tuple unpacking" for you , and extracts the (x, y) to local variables a and b respectively.
You can read more on tuple unpacking here
This is called, appropriately enough, tuple unpacking. Tuple unpacking requires that the list of variables on the left has the same number of elements as the length of the tuple. Note that multiple assignment is really just a combination of tuple packing and tuple unpacking!
Here is a quick demo which should demonstrate this:
>>> pt1 = [1, 2, 3]
>>> pt2 = [4, 5, 6]
>>> pairs = zip(pt1, pt2)
>>> pairs
[(1, 4), (2, 5), (3, 6)]
>>> sum_sq_diffs = sum((a - b)**2 for a, b in pairs)
>>> sum_sq_diffs
27
>>> sum_sq_diffs_2 = 0
>>> for a, b in pairs:
... print a, b
... sum_sq_diffs_2 += (a - b)**2
...
1 4
2 5
3 6
>>> sum_sq_diffs_2
27
>>>