Syntactically, a while loop starts with the while keyword, followed by a Boolean condition and a do/end chunk. The loop will keep executing the chunk of code so long as the Boolean condition evaluates to true:
x = 10 -- Initialize a "control" variable
while x > 0 do -- Boolean condition: x > 0
print ("hello, world")
x = x - 1 -- Decrement the "control" variable
end