As an example of how procedural content generation (PCG) works, I’ve created a little demo.

In this case the level genotype is a random number, which the unpacking algorithm uses to mine out a level map.  Entering the same number as a seed creates exactly the same level, however the simple algorithm provides millions of variations on the level.  Granted, at this stage there is not much to tell one level from another other than geometry, but it should be easy to see how the geometry could be varied over time, and of course there is nothing restricting the technique to a grid pattern.

This second video has a minor modification, the algorithm back fills any areas it finds that are almost completely surrounded by space, which allows the map to look a little more natural.