Their are some interesting ways to generate random numbers (
http://inventgeek.com/Projects/alpharad/overview.aspx comes to mind ).
If you are really interested in random number generation, I would recommend that you pick up a few books on cryptography, and make sure your math skills are up-to-date. You might also check out Bruce Schneider's page at
http://www.schneier.com/ . If you are really brave, you can download an open source cryptography program and dissect it's PRNG.
As to your questions, the way it works will vary based on the implementation by the vendor. Their are good PRNG's and bad PRNG's, though most of the ones released today are pretty good.
Most will start with some sort of seed value. This value is often "gathered entropy", or randomness from some source. Some will use mouse movements, or keypresses to generate entropy, other will use static from the LINE-IN port, or from a video or radio receiver ( like random.org does). If you really want random, you can use natural phenomena, such as atomic decay or any number of values from quantum mechanics. The link at the beginning of this post points to a project using atomic decay and a ccd webcam. Depending on the algorithm, more than one source may be used.
This seed value is fed into some algorithm.
http://en.wikipedia.org/wiki/Random_number_generation]Wikipedia[/url] has a few examples of algorithms. The algorithms used range from fairly simple (you can do it with pencil and paper) to mind-numbingly complex (you better buy paper by the case). As with all things, some are better than others. Their are a number of algorithms where certain numbers simply don't come up as often as they should (particularly at the very beginning and very end of the range). Weaknesses in the PRNG algorithm can be exploited, but most are actually pretty good. The major security products I have looked at have great implementations of PRNGs.
Once the algorithm calculates a number, it is put into the range requested. This is simple math, but from a programmers perspective, you should understand the function you are using (ie RND(10) may give a number greater than or equal to 0 but always less than 10).
Thus you have a pseudo-random number.
How good of a pseudo-random number you need depends on your application.