boolean isPressed = (digitalRead(btnPin) == LOW);
A boolean value will be either false (0) or true (non-zero). What happens here is that a boolean variable, isPressed is created and assigned the value of the result of a comparison. The comparison will return either zero, for false, or non-zero for true. It's kind of a slick way to store the result of a digital read, which returns an int type, in a smaller boolean type (saves a byte of RAM). Every time that line is executed the switch will be read.