The when expression in Kotlin works like a powerful switch statement. It evaluates a value once and checks it against multiple cases in order. When it finds the first matching case, it executes that case and returns its result immediately, skipping the rest. If no cases match, the else branch runs as a default. This makes when concise and expressive for branching logic. In the example, x is 2, so when matches case 2 and returns "Two". Variables track the value of x and the result returned. The execution table shows step-by-step how each case is checked and when the match happens. This helps beginners see how when stops checking after the first match and how the result is assigned. Remember to always include else if your cases don't cover all possibilities to avoid errors.