I'm confused about the dialogs. What's the logic behind the OK button?

If you click OK without having done anything else, the action is performed and the dialog closed. If you click OK after having clicked Apply, the dialog simply closes and the action is not performed.

When you're using the Subdivision or Specral Synthesis dialogs, the first time (after calling the dialog from the menu) when you click on Apply, a Height Field will be generate in a new window. Subsequent Applys will generate new HeightFields in the newly opened window until the dialog is closed.