Ah! i used to wonder a lot about that. Iv never found out for sure how one really works but this is how think they work:
Idea #1
All you do is create a new clock based on the rising and falling edges of the existing clock, so you start out with say a 20Khz squarewave. You would then make a circuit that created a short pulse as it detects a rising or falling edge . Obviously the length of the pulse created as the circuit detects each edge would have to be short, i.e < 0.5 times 1/20KHz. (i.e less than the mark or space of the original squarewave.. it would probably be best to keep the mark space ratio equal actually.
____------____------____------____ - 20Khz Squarewave
---__---__---__---__---__---__---__ - 40KHz Sqaurewave
So i imagine you would repeat this for as many stages as you needed to reach the required frequency.
Idea #2
I think making a circuit to create short pulses is almost cheating as regards this problem cos if u can make higher frequency pulses why not just make that into an oscillator and use that..
so my second idea is more interesting..
What you do is have a number of clocks running at an identical frequency, say 10 * 10KHz clocks. But run them all slightly out of phase, by a very precise amount, so the master clock starts at 0degrees, and you have the remaingin 9 clocks lagging that by x degrees each like this: (il demonstrate with 3 clocks for simplicity). You then create a new clock based on, say for simplicity the rising edges of the clocks:
clock 1: --------______--------______--------______--------______
clock 2: ___--------______--------______--------______--------___
clock 3: ______--------______--------______--------______--------
result:x.----___----___----___----___----___----___----___----___
In the example above youd need to work out some logic to take in all three clocks, and toggle the output whenever a rising edge was seen on one of the inputs.
In that case of computers tho i imagine its done in a much more ingenious and complex way to that, something to do with phase locked loop type things i suspect.