Stopping condition

I am not able to understand the stopping condition in for loop as i don’t know how does k help to stop the loop