How the comparison works
The tool finds the longest common subsequence (LCS) of lines: the largest set of lines that appear in both texts in the same order. Everything in the original that is not part of it is marked removed (−), and everything in the new text that is not part of it is marked added (+). This is the same idea behind the classic Unix diff.
L[i][j] = a[i] = b[j] ? L[i+1][j+1] + 1 : max(L[i+1][j], L[i][j+1])
Example
Original apples, bananas, cherries vs changed apples, blueberries, cherries: "bananas" is removed, "blueberries" is added, the other two lines are unchanged.
A changed line appears as one removal plus one addition. Whitespace counts, so a trailing space makes two lines different; run both texts through Remove extra spaces first if that matters.