From what I understand of the ECU is, given the wide variance of different fuels available, your ECU will advance or retard timing to compensate for higher or lower octane. The Research Octane Number (RON) comes from the ability of the gasoline to resist preignition (which is where knocking comes from). The higher the octane, the higher the resistance.
So, if you use a lower octane, the point of ignition changes. If this were an old car, basically the ignition would be occuring before the piston reaches the top of its stroke, and would provide a split second of resistance against the motion of the piston (which is what will damage internals). This is where your ECU kicks in. Your motor has sensors to tell the ECU when this happens and the ECU will adjust timing to compensate. By changing the timing for the ignition of the fuel you're using, to allow the ignition to happen when the piston is at the top and not on it's way to the top.
Sorry if this is a repeat of already known information. Just tryin' to help conceptualize commonly used terms.