Usually the execution moves out of the while loop when the test expression is no more true.
Or we have various control statements like break, pass or continue.
Break usually skips the entire remaining iterations, and continue skips the current iteration and executes the remaining iterations.