The update clause
Regardless of the fact that the optional update clause is physically located in the loop header at the top of the loop, it is executed as if it were positioned at the end of the body of the loop.
In other words, once during each iteration of the loop body, after all of the code in the body of the loop has executed, the update clause is evaluated.
In this program, the update clause is used to increment the counter eventually causing the conditional clause to evaluate to false, causing the loop to terminate.
The update clause can be left blank, but even in that case, the semicolon is required. Also in that case, some other process must be used to eventually cause the loop to terminate.