When you need to get the next random number ("marble") the generator calculates it with some algorithm. It is based on the previous generated number, in turn, depending on the initial "seed." The algorithm is strict, it will always produce the same sequence of random numbers ("marbles") given the same initial "seed".