CPU's are made up of transistors. Transistors are electrical switches, they're either on or off. Whether they're on or off depends on voltage differentials... higher voltage is on, lower voltage is off. When the length of time between on and off is only billionths of a second, the on off signal isn't as clear. Higher voltage makes that signal more clear.
When the speed of a CPU is increased, it also requires more current, which doesn't directly have anything to do with voltage, but if you're getting to the point where you're stressing the componants that deliver power to the CPU, your voltage will drop because of the extra current draw. Increasing voltage may fix that problem, but not completely since the componant delivering the power still can't provide enough wattage (volts x amps).
Then there's current leakage. As I understand it, current leaks all the time, there's no way around it. For this example, lets think of it in terms of amps per clock cycle per second. If you increase the clock cycles per second, you'll have more current leakage per second because there's less time between clock cycles for the voltage to stabilize which confuses the CPU because there's no clear on/off signal since so much current is leaking. So you increase the voltage in order to make that signal clear again. As we know, voltage is electrical pressure. Increasing the pressure increases the amount of leakage as well, but not enough to offset the benefit of the clearer signal provided by the extra voltage.
Increasing voltage to the memory does the same thing, since RAM operates at a certain frequency as well, and increasing that frequency (overclocking the RAM) decreases the clarity of the signal, so increasing the voltage also increases the signal clarity.
There's also another way to overclock RAM... with the timings. I can't remember what each specification means exactly, but basically, lower timings are better (with the exception of nForce2 motherboards that prefer a tRAS setting of 11 because of the design of the memory controller), and the numbers represent clock cycles. For example... I belive the CAS latency you see advertised is actually called the CAS to RAS latency, which is the number of clock cycles required between accessing a column, and then accessing a row. You see half numbers, like 2.5, because DDR RAM transmits data twice per clock cycles, so, 2 clock cycles pass, where 4 wait states occurr because there's no data to transmit yet, then another wait state occurrs because there still isn't any data to transmit, but half way through the 3rd clock cycle, data can be transmitted on the falling side of that 3rd clock cycle.
Memory ratios are the relationship between the FSB speed and the RAM speed. FSB:RAM
Also, it should be stated that P4's have higher memory bandwidth than Athlon XP's Because an Athlon64 FX has about the same memory bandwidth as a P4. The reason running the P4's RAM slower than the FSB doesn't hurt performance is because the P4 at it's current speeds doesn't need a full 6.4 GB/s of memory bandwidth, which is what a dual channel 800 Mhz FSB Pentium 4 has at it's disposal. If you look back at the 533 Mhz bus P4's, you'll see that the 533 Mhz bus has about 4.2 GB/s of bandwidth on the FSB... and back before the P4's had dual memory channels, PC3200 RAM, which has 3.2 GB/s bandwidth wasn't enough to feed the Pentium 4's 533 Mhz bus. That's why overclocking the FSB and RAM of the 533 Mhz bus P4 made such a huge difference in performance, it was severely starved for memory bandwidth.
Hopefully I explained that clear enough that you now understand the purpose of increasing the voltage. If not, sorry, that's the best I can explain it =)
*EDIT* Increasing voltage to the RAM won't necessarily help you run lower timings. I stress that now because I have Mushkin PC3500 Level 1 RAM running 218 Mhz @ 2-3-3-11 on 2.6 volts. It's perfectly stable. Increasing the voltage to 2.7 volts causes Prime 95 to error immediately, and 3DMark crashes to the desktop. So... increasing the voltage to the RAM won't always help... and this is why overclocking is not an exact science. It takes some trial and error... as well as knowledge of what to try, and how to determine where the error is.
(sorry for the many edits, I keep thinking of things I want to ad, lol)