In a general sense, looping is the repetitive execution of a group (or a single) statements while a certain condition is not yet met, or while a condition remains true. In regards to setting up the loop, it depends on what you're trying to achieve.
bool condition = true;
while( condition == true ) {
//repeat any code inside those "while" brackets as long as "condition" is true,
//and of course you must put something like "condition = false" statement to end the loop,
//otherwise its not gonna stop until your IDE stop the program or the program crash your pc.
}