Computers do not truly generate random numbers. When fetching a random number, it just gives you the next number in a sequence of seemingly random numbers (they have no pattern or connection to each other).
A seed is what truly randomizes this list of numbers, in most cases, the current system time will be used as a seed.
You could think of a seed as a way to get the same random result repeatedly.
The way a Minecraft world is generated is by an algorithm that repeatedly fetches random numbers such as when to increase surface height, etc...
Using seeds, these random numbers will be the same each time, which results in a world being the same when the same seed is used.
That being said, seeds do not take up disk space because they are simply a way to scramble/randomize the list of seemingly random numbers.