The formula is something like
power = freq. * voltage^2 * capacitance
(Don't quote me on this formula. I'm probably missing a thing or two.)
I believe capacitance is a fixed value for a given processor.
It should be quite apparent that when we increase frequency, power consumption increases linearly (or close to it, who knows what other factors it affects).
Increasing voltage increases power consumption exponentially, which would explain why increasing voltage is dangerous - with the increased power consumption, we also increase power dissipation.