Here we provide a background on Perlin noise and explain the Perlin noise algorithm in detail.
Perlin noise is probably the most popular algorithm for generating random textures. Perlin noise was invented in 1985 by Ken Perlin, a professor at NYU and among other things was used for creating animations for several movies including Oscar winning Tron and many others. Here is the URL to a talk by Ken Perlin, detailing what has been achieved using Perlin noise: http://www.noisemachine.com/talk1/index.html.
The big advantage of using Perlin noise is that even though it is random, the pixels next to each other are still correlated – just the way they are in natural textures.