Yeah, I've never seen it explained very well.
The way I would explain the basic idea is that opposition only lets you zone out the enemy king along a file or rank... not both.
So when you "outflank" you're letting the enemy king take opposition (if he wants it) but it can only block you out along (in this case) a file. Since your goal is to touch either f8 or h8 blocking you out along the g file doesn't make any difference.
Black to move, white has direct opposition
The white king is blocking the black king along the rank, but black can visit any file he wants
Black to move, white has distant opposition.
White can prevent the black king from coming into the bottom right quadrant, but distant opposition can't prevent the black king from touching any of the 4 edges of the board (a1-a8, a8-h8, h8-h1, h1-a1)
In this exceersice: https://www.chess.com/lessons/view/328
Once the black king reaches h8, white can being outflanking. A few moves later (10. Kh4), white outflanks again despite black being able to take the diagonal opposition. But suddenly this is not so bad. If I would have done this two moves earlier, blacks diagonal opposition would have mattered. It's so confusing.
What is the definition of outflanking in this case?