How do computers create 'randomness'?
Randomness is a philosophical concept (though there are several mathematical definitions as well). There are two aspect to randomness generated by a computer, unpredictability and pseudorandomness, which correspond to two different demands from a randomness source:


Data produced by the randomness source should be unpredictable, even in principle.
Data produced by the randomness source should "behave" as a truly random source.


The approach taken by computers to generate randomness is a combination of both of these flavors. Randomness is generate using a pseudorandom number generator, which is an algorithm designed to churned up numbers which "look random", in the sense that any program employing a randomness source will behave the same regardless of it being given a truly random source or the output of the pseudorandom number generator. ARC4 (usually known as RC4) is such an algorithm, though the first few random bits are known to be somewhat problematic.

A pseudorandom number generator (PRNG) is seeded by initial randomness, known as either a seed or a key. Sometimes we want to fix this initial randomness, for example when debugging a program which uses the PRNG. Other times, it is important that this initial randomness be unpredictable - this is the case in cryptographic applications. It used to be the case that PRNGs are seeded using the exact time-of-day as kept by the computer clock. Nowadays systems are more sophisticated, and harvest random bits from other sources such as keystrokes, CPU, internal devices and network usage, commonly known as an entropy pool. Therefore modern systems are capable of producing unpredictable random numbers.

If it is important to generate truly random numbers (or rather, numbers which are even less predictable), one can resort to hardware number generators, which usually measure thermal noise generated by electric components such as diodes (in the form of voltage or current fluctuations). However even this random output needs to be filtered (through a randomness extractor) to result in a sequence of independent fair coin flips.