Overall, this sketch is very similar to the "If Loop" in our last lesson. It relies on a new function, however.
The argument for while is the same as for if, it's a comparison operator. In this case the code in the curly braces will run if the statement in parenthesis is true, just like with if. After the code is run the Arduino checks again to see if the statement is still true. If it is the code will be executed again. This will continue over and over again until the statement is false. Then the program continues on. Note, whatever variable is being checked must be changed within the while otherwise once the while loop starts it will never end.
Time to Play