A random number generator on a computer is an algorithm which produces a sequence of numbers which are considered random since there is little correlation between the consecutive values. There are several different implementations, the most common is a sequence of state machines which feed outputs from one machine into the next through some xor gates and there are feedback loops which control these gates, so as the random number generates values (
number picker tool), the values are ‘feedback’ into earlier states and this creates the randomness, the machine is tuned to give a realistic sequence of random numbers. The numbers are really ‘pseudo’ random since the random number generator will generate the same sequence if initialize with the same values (seed), but that is usually good enough for most purposes.