After initializing the corners with some values, we go from the outer corners, working inwards and propagating those values with some randomness.
The key thing is that by working in steps, subdividing the grid into squares and diamonds, we get a randomness similar (to some extent) to the randomness we find in landscapes in nature.
It's important to fine-tune the initial values to get better results according to our specific needs for our game.