The ternary operator is shorthand for an if-else block. In your case:
if (val != 0) {
s += "high"; // s = s + "high"
} else {
s += "Low"; // s = s + "Low"
}
That is, if the logical test on val is logic True (i.e., non-zero), "high" is added to s. If val is 0, then "Low" is added to s. Evidently, s is a String variable.