The first step uses 2-D perlin noise to generate a height map. Nothing fancy.
The second step mi-... WHAT.
The second step mixes in 3-D perlin noise in some places. (This whole "in some places" bit will be fleshed out later into a nice, flexible biome system). The general shape of the terrain is still the same as in the first picture, though.
3-D Perlin noise is, simply put, a function that takes an x,y,z position as its input, and returns a value beween -1.0 and 1.0. It is a bit like measuring the temperature at a given point. For two positions that are right next to eachother, the returned values will be almost the same. But two points far apart will return completely unrelated values. This value is multiplied by some factor, 30 in this case.
Once we have this value, we subtract the relative height of that point to the surface that was generated in step 1. If the result is positive, a block of grass or dirt is placed. If not, it's air. The end result is some weird craggy terrain, and some floating boulders.
The same valley, seen from the other side: