"The map generator uses the same algorithm as the HOMM3 RMG, expect it creates only two-player land maps (and lacks some of tables for the visual candy). Briefly, it works by first creating an abstract representation of the map and how the areas are connected. After that, the areas are created and filled with different terrains. In the last phase all the objects and guards are placed.
You can download the unofficial RMG and view examples at the Heroes Community. The real random map generator will ship with the Hammers of Fate expansion in a few weeks.