They don't.
All random number generators start with a seed, and the seed is supposed to be completely random. They then generate a series of numbers that is as unpredictable as possible based on this seed.
Some generators work with an entropy pool, where they need a constant supply of random input and generate a series of unpredictable, random numbers out of it. When the pool is empty, it is deemed that the numbers produced are not random enough, and the generator will stop until more entropy is introduced.
Some common examples of seeds are the current time, a collection of mouse movements, timings between keystrokes, etc.
There are basically two classes of generators: simple and secure ones. For everyday stuff (games, AVS, ...) you don't need real randomness, just apparent randomness. For cryptographical applications, much stronger generators are required with proven mathematical qualities.
Using the current time as the seed is fine for common programs, but I remember reading about a security application getting cracked because it was run at the same time every day automatically (and was using the time as a seed), and thus the cracker could predict what 'random' numbers it would generate.
If you're interested in this sort of stuff, I recommend the book 'Applied Cryptography' by Bruce Schneier which you can get at any
scientific book store (.tar.gz).