The Terrain Editor can be unlocked in your inventory (the button with the cards in your main menu bar on the right side) at level 25 and up for either 50 Diamonds or 500,000 Coins.
You can use it by clicking on it in your inventory:
...and then selecting your desired terrain from the menu on the side:
Once you have have picked a terrain, you can just "paint" the ground with it. Like the bulldozer, the terrain editor requires Energy to use. You can see how much your current selection will cost in the center bottom of the screen, and how much you have available in the bottom right corner:
Once you are happy with your selection, just confirm with the green checkmark.
You can get more Energy for the bulldozer by buying it with the + in the bottom right corner. You'll also get Energy as rewards for quests, from the Prize Wheel and from the monthly calendar.