The syntax is while (condition) { /* body */ }. The condition is checked first. If true, the body executes, then the condition is checked again. The loop body can contain any statements: declarations, assignments, function calls, or even other loops.
Curly braces are required for multiple statements. Here's an example: int i = 0; while (i < 5) { cout << i; i++; } prints 0 through 4. The loop exits when i reaches 5.