The Comparison node does a logical comparison of the first 2 input textures, then based on the result, outputs one of the second 2 input textures.
Input A - The first input texture.
Input B - The second input texture.
If A Less Than B - The texture that is output, if A is less than B
If A Greater Or Equal B - The texture that is output, if A is equal to or greater than B