While loop and do loopWhile loops are conditional loops where a condition is checked at the starting of the loop and if the condition is true then the statements inside the loop is executed. So the changes required in condition has to be inside the statement, otherwise the loop may go for infinite looping. For easy understanding we can say While True Loop. This means as long as the expression is turn go for the loop.
You can also see PHP while loop, ASP will loop which have more or less similar purpose and to some extent similar syntax.
while ( expression )
Note that here the expression is checked or evaluated before starting of the loop so if the condition returned is FALSE then the loop will never be executed.