To clarify a little more, a 2.4GHz dual core can only operate at 2.4GHz on any one task. However, while it is doing one task, it can simultaneously be doing another task without slowing the first at all. Because of this, if several commands from a program can be done independently and simultaneously, a quad could be up to 4x faster than an otherwise identical single core. Most games however can only really issue one command at once, so a 2.4GHz dual core will beat a 2.0GHz quad core, and be slower than a 3GHz single core for most of these types of tasks.
The reason that a Core 2 Duo 2.4GHz will be much faster than the 3.0GHz P4 is separate - the Core 2 Duo has a more efficient architecture, which makes it do more in each clock cycle. Because of this, a 2.4 GHz Core 2 Duo will beat a 3.4GHz Pentium D, even though both have two cores and the pentium has a higher clock speed.