Check prime break statement use inside the if statement

n this check prime number we have used the break statement in while loop inside the if statement so once statement get break then it takes us out from while loop then how the loop do updation ( I=I+1) this also inside the while loop. Here inner loop is if statement not a while loop ??