There are true RNGs that use a physical source of randomness such as resistor noise [0] feeding into a comparator. Most of the things like mouse movements can be random(ized) but tend to be really slow (few random bits per second).
Psuedo-RNGs typically use an algorithm (such as a hash) which is very hard to reverse. The next value is deterministic and easy to predict if you know the algorithm and input values, but effectively impossible (i.e., 'random') if not.