Noise
This page will explain how the Perlin Noise Generator up to at least Beta 1.7.3 worked.
Perlin Noise
The algorithm used by most of Minecraft’s Terrain is “Improved Perlin Noise”, first published in 2002, which is a slightly tweaked version of the original Perlin Noise Algorithm from 1985, both by Ken Perlin.
The official paper can be found here, however a more accessible option is the Wikipedia page on Perlin noise.
The Farlands occur here a 64-Bit Floating-point number being wrongfully limited to a 32-Bit Integer, capping it out at the maximum value of a 32-Bit Integer, resulting in the same permutation from the permutation table being chosen repeatedly.
Simplex Noise
Minecraft utilizes Simplex Noise for its Biome values (Temperature & Humidity). As with Perlin noise, more can be found about this algorithm on Wikipedia. It was also developed by Ken Perlin.
Noise Octaves
A common practice when using Perlin noise is to use multiple octaves/layers of it to improve fine detail, resulting in a more realistic/natural appearance.
It boils down to halving the size of the noise, while also halving the amount of noise each additional octave adds.
X, Y and Z values are passed as input. Then appropriately scaled noise is sampled, with the result scaled by the multiplier.
    double total = 0.0;
    double mult  = 1.0;
    for (int i = 0; i < octaves; ++i) {
        total += perlinNoise(x / mult, y / mult, z / mult) * mult;
        mult  *= 2.0;
    }
    return total;
Further reading
From here on out, one can read about how the rest of the world generation is done. Check out the page for the World Generator.