The often used notion "random numbers" is misleading. Every number is random. Randomness rather refers to sequences. Look at the following sequences. Which one is "random"?
A: 1,0,1,1,0,
B: 1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,
C: 1,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,
D: 33,23,9,79,89, 83,77,27,73,15, 73,51,81,27,97, 47,17,11,41,19,
73,71,13,67,57, 7,9,91,.................
You can not define randomness simply to be the outcome of a random experiment like coin tosses. Though very unlikely, it is still possible to get a sequence 0,1,0,1,0,1,0,1,0,1,0,1, as such an outcome.
Gregory J. Chaitlin and independently A.N. Kolmogorov defined a sequence of numbers to be random if "it cannot be compressed"---every computer program creating it would be at least as long as the sequence itself; every description of the sequence would be at least as long as the sequence itself.
There is also a statistical definition, where randomness is the opposite of (partial) predictability.
For passwords (the more random, the more difficult to crack). Claude Shannon showed in ... that if you use a key of the same length as the message in ordinary (symmetric) one-key encryption, then it is impossible to break the code.
In the Ethernet protocol.
in randomized algorithms.
Deterministic machines like computers cannot create randomness. The sequences created by such algorithms (like example D, where you multiply a number by 997, divide by 100, and take the remainder to be the new number) are called pseudorandom. According to the Chaitlin/Kolmogorov definition, they fail very much, but statistically some of these sequences have rather good properties.
Therefore mostly physical events, like radioactive decay or thermal electronic noise, is measured and used to create random sequences, even the Pentium 4 has such a build-in random number generator.