Higher octane affords more boost, timing or leaner mixture. Sometimes combination of all three. Just depends on engine and current state of tune.
I'd always try and run it as efficient as possible.
Octane number is basically resistance to autoignition, higher it is less autoignition/ knock chance.
Now higher octane fuels could be mixed with other ingredients such as ethanols which increase resistance to knock even more.