If you advance the timing, you move it to a point earlier in the combustion cycle. Since ignition is usually triggered as the piston is rising on the compression stroke, then this means that advancing the timing means the piston is further from TDC.
In general, advancing the timing tends to increase the chance of detonation (knocking or pinging) and a higher octane fuel will help prevent this. In some engines, advancing the ignition will improve combustion, but this is not always the case. It's not the higher octane fuel that gives you more power, it's the ignition advance.