When you create a world, a seed is chosen. You can type in one yourself to be used, or leave it blank to use the current system time:

The string you type is converted into an integer, which is why, even if you put a seed with letters in it, it'll always appear as a number in game with F3 or /seed.
This seed is then used for all of Minecraft's pseudorandom calculations in generating the level. These functions take the seed, then map it to a seemingly random value, but always the same value.
Unlike a cellular automaton, because of the random function, the input seed has no real relation to the output level. "1234" and "1235" will not produce similar levels, and there's no patterns like "lots of 5's give you jungles", although it may be by chance that "5555" spawns you in a jungle.
You can learn more about seeds on the wiki page:
https://minecraft.wiki/w/Seed_(level_generation)