I can give you the very very simplified answer. Maybe someone else will give the mathematically correct answer. You could also look in numerous books, not necessarily just the deep cryptological books. Knuth for instance has a section on it.
Simply, a random number function is a function that changes a number into another number, cycling round a whole set of numbers. For instance
a = (a+1) mod something
is a rule that cycles through a whole set of number 0, 1, 2, 3, ... (something-1), 0, 1, 2....
The only problem with this rule is that its output doesn't look very random. So a good random number generator produces numbers which are very hard to guess from their predecessor, but cover all possible numbers 0-n with no gaps (gaps are inefficiency).
You'll notice that there is nothing random about this at all, and a super intelligent martian wouldn't even see the numbers as random; s/he would see the sequence in the same way as we see the sequence 1..2..3..4 etc. Hence these should be called pseudorandom numbers.
When you set the random number seed, you set the number that is cycling. It cycles once every time you then read a random number. The number you read is derived from the seed number in some (often simple) way.
It is possible to get true random numbers by hardware (electronic white noise generator etc), but this is not an easy task! It is hard to get a random signal entirely free of systematic noise of some less-than-random form.
To avoid getting the same random sequence every time you start a program it is normal to set the seed, once at the start of the program, according to something that is not the same every time the program is started (e.g. system clock). But you can also set it to something derived from a password (for instance) if you are using it to encode a text (for example).
Hope that helps!