For each runs a block for every item in a desktop list or data table. Its current-item variable identifies the row for that iteration. A field on CurrentItem can change each time, while a variable set before the loop remains the same until an action changes it. This distinction prevents a flow from repeating the first record for every row.
If controls a conditional block inside or outside that loop. Put the If inside For each when each record has its own status. Put it outside when the entire batch has one decision. Empty lists create no iterations, and duplicate rows remain separate work unless you add a deduplication rule. These local tasks use desktop percent references for values and a visible comparison expression for conditions, so you can trace the chosen branch and the simulated message for each row.