While condition X is true, we remain within the while loop. So we are testing X again, and if true, continue into the while block. When X stops being true, we cease entering the while block and continue with the rest of the function.
while condition X is true
execute instructions Y
execute instructions B
This differs from an IF statement, in that if the statement is true, the block is entered, and then continue on with the function.
What if we need to initialise values?
p ← 1
i ← 1
while (condition X is met)
p ← p · i
i ← i + 1
We are evaluating, then reassinging values to the variables p and i. If we forget to update the values, the loop will be infinite.