FX lineup is a bit... weird, but previous posters have it mostly right. the basics.
1) First number is number of cores (except on the 9000 lineup, those are all 8 cores... i guess you could call that the fx version of an extreme edition cpu)
2) Second number is something like a generation (though there are only 2 generations of fx chips and they're numbered 1 and 3, so there is a number skip in there)
3) Third number is the base speed of the cpu... there is no real breakdown of how they use this number, as there doesn't seem to be a rhyme or reason for it. generally know that the higher number is clocked higher (GHz) then the lower number IN THE SAME GENERATION and Core count!
-as an example, the fx 6300 is a base clock of 3.5ghz with a turbo of 4.1ghz, the fx 6350 is a base clock of 3.9ghz with a turbo of 4.3ghz, while the 8320 is a base clock of 3.5ghz with a turbo of 4.0ghz, while the 8350 is a base clock of 4.0ghz and a turbo of 4.2ghz. so as i said, the "speed" number in the name doesn't translate into any meaningful data other then it's got a higher base clock and turbo speed then the lower number.
4) fourth number hasn't been used yet, thus far you'll only see a 0 here.
AMD APUs
APUs have a different naming convention then their FX cpus; an apu uses the same "core" as an fx cpu, however it adds on a radeon graphics core for onchip video... The a10 and a8 are quad cores, the a6 and a4 are all dual cores. Its probably easiest to think of these APUs in the terms AMD describes them. The a4 and a6 are meant to be energy efficient HTPC chips, or simple office/web surfing chips. The a8 is more mainstream, while the a10 is meant for more gaming. Generally the difference between an a4 and a6 is the a6 has a better graphics processor, the same is said for the difference between an a8 and a10, where the cores are about the same power, just the onboard gpu is better in the a10.
the apu comes with 4 more numbers following the A10/8/6/4 designation. The first number represents the "generation," the second number represents the base clock speed, the last two numbers aren't used yet and are zeros. There is two prefixes you might see behind those 4 numbers. M is for mobile, for the mobile APUs and K means it has an unlocked multiplier for overclocking.