There are a number of different algorithms for procedural generation. Before discussing any of those, one needs to ask first what is your goal? A few basic things help. Do you want a 2-d or 3-d landscape? Is it enclosed, or built inside something? Do you want an organic, or manmade feel? All of these are critical to understanding what it is exactly that you are looking for.
There are a number of different ways to generate such terrain. Two of the most common are Perlin Noise and Cellular Automaton. Perlin noise is great for generating organic looking noise. It can be used to generate clouds, mountains, landscapes, and many more things. Cellular Automaton is based on "Conway's Game of Life", but is more generic. This is good for generating dungeons, and other closed feeling lands. There are many other algorithms, such a piecing blocks together randomly, used in the original X-COM map generation, to things that use sophisticated physical force modeling algorithms, but the important part is to focus on what you are hoping to gain from the map generation, and then implement it, tweaking it to meet your needs.
I have been learning to use Perlin Noise, with a touch of help from these Cellular Automaton, to develop terrain for my upcoming project, codenamed Project Ahoy. While I haven't quite generated my terrain map, I do have my algorithm in mind to use. Note that Unity comes with a Perlin Noise generation function, Mathf.PerlinNoise(x,y), but I wanted to write my own to understand it better, and tweak it if required. Here are a few sample maps made with my code:
public override float Get(float x, float y)
float value = 0f;
float octave = baseValue;
for (int i = 0; i < weights.Length; i++)
value += weights[i]*PerlinNoise(x* octave, y* octave);
octave *= 2;
Note that each iteration, the features will become smaller, while using a new weight. The amount of change per octave can also be changed. Tweaking these points will get you what you want. All you have to do is create a heightmap, passing in the x and y coordinates for each point into this get function, and you will be rewarded with organic noise coming out.
Learning about the various tools out there can help to draw inspiration, but there are limitless algorithms to choose from. The most important thing to think about is what do you want the land to look like? Good luck, and I hope to see some of your worlds soon!
Ben Pearson is the author of the Amateur Radio and other technology blog KD7UIY and developer of Games and Apps at Google Play pearsonartphoto, where he plans to publish some of the games created by inspiration of gamedev.tv. He is currently working on a Sea Trading game, which you can subscribe to updates at his Google Group. He has been a programmer since a young age, although only recently is learning programming with game engines. He has completed the the Complete Unity Developer Course and the Procedural Generation courses, and is working through the Complete Blender Developer Course and Unity Game Physics courses. He is hoping to soon start Unreal Courses soon. Follow him on Twitter @KD7UIY.