Before we take a stab at why polearms are (frankly) a better weapon, let's cover some basics.
1) The spear is just about the oldest known weapon in human history. It wasn't long after people figured out how to bludgeon each other with stones that someone smarter thought 'let's make it sharp'. And then an even deadlier genius had the idea to lash it to a long stick, adding to even more jabby-ness.
2) Have you seen 300? The phalanx is an incredibly effective formation dating back to antiquity. The basic idea is to form a near impenetrable wall of shields bristling with, you guessed it, spears!
3) The overall idea in combat is kill or be killed. The best way to not get killed is to be out of reach of your opponents weapon. So the simple math of 3 foot sword versus 8 foot spear = 1 dead swordsman.
4) The final point I will make is that swords were quite expensive and took a lot of training to wield effectively; whereas, Yorik the farmer could easily heft a pitchfork (or other long, stabby apparatus) because he was probably holding it anyway.
Now let's look at some options for what is on the business end of your long stick
For more about spears and fighting techniques for various polearms, including the often over-looked, military fork, check out http://phillosoph.blogspot.com/. It's a great resource for many things medieval.
For a long list of links to various weapons, might I recommend Wikipedia: Medieval Weapons.