where "do_something" can be any code you like, usually with some way of exiting the loop. Either change the value tested in "condition" or just use a "break" statement to escape from the loop.
A nested loop is exactly the same, except that some or all of "do_something" is itself a loop.