Conditional statement help

curS = S1;

Why are you assigning the variable the pin number of the sensor?