I want to learn why cpu's are better than others, and what is the significance of ghz amount?
Ultimately, how much does a cpu matter when it comes to gaming... lets say
"age of empires online" which is a newer game than age of empires 3.... would the higher ranking cpu play the game better and have less lag if both cpu had same graphics card, lets say HD 6850 Radeon.
Well first of all, Passmark is not a very good indicator of performance since everything is user submitted and no kind of strict controls are used. What makes a processor better than another can be various things. Clock speed (ghz), core architecture, number of cores, etc
Generally Intel processors have somewhat more efficient core architecture than AMD chips. That's why they're all clustered around the top of that list
As for the 2 you listed, the i3 is much newer architecture and has an extra 2 threads which adds to performance in Passmark tests. The Pentium D is simply outdated crap
There are many things determining a cpu speed and GHz is one of them. Other things include the number of cores, the number of threads, the speed, latency, size and bandwidth of the cache and memory controllers, the accuracy of the branch predictor and the number of instructions executed per clock cycle.
But these are just technical features. You can never look at a list of specifications on a CPU and accurately guess its performance, because its performance depends on too many things. (You can, however, use GHz as a rough indicator of relative speed between two processors that are essentially the same (or similar) in all other respects.)
In the case of the Pentium D, this is an old processor architecture. Modern CPUs improve on it in every way possible and are far, far faster at a given GHz speed. Actually the Pentium D was notorious even in its day for needing enormous GHz speeds even to remain performance competitive. Note that GHz speed is not "free". Increasing it has a cost in terms of heat and some architectures just cannot reach higher clock speeds.
As for games, the benefits of a good CPU depend on the demands of the game and the power of the graphics card. VERY roughly speaking, pairing a mid-range graphics card with a mid-range CPU, or a high-end graphics hard with a high-end CPU will give you an approximately balanced system. This is not quite true because in most games the GPU bottlenecks first, (meaning that you will generally get better bang per buck by getting a better graphics card), but it's a good rule of thumb.
A bit of history: when it came out, P4 (from which Pentium D came from) was slower at the same frequency than P3. But it had more headroom, and at 2.4GHz it beat every P3 available. But while trying to reach 4GHz, Intel saw that the architecture was consuming too much power. While overclockers did use it at 4GHz, it was not ready for consumer use. So they started from almost scratch: they already had a team to improve P3 for laptops, so they improved even more on that and got Core2Duo: lower frequencies, lower power, higher performance. Infact, the E6300 I've had, at 1.86GHz would be compared to the P4 Extreme Edition at 3.73GHz (dual core both of them). Of course, only performance would be compared, as the E6300 was way lower on power.
Basically, that ended the GHz wars, and AMD would never take the performance crown back (they had it for a while with Athlon 64 against P4).
Now, for your question: GHz can be used for performance comparison of same CPU core. But once you compare 2 different cores, reviews should be the comparison. Tom's Hardware has a nice CPU comparison table.