Would a decent CPU be better than an integrated graphics card?
Depends on the "integrated graphics card". Sure, a today i7 is faster than a 10 years old notebook integrated graphic card. But today cards integrated in the CPU like the AMD APU? No. That is the reason why modern cpu integrate a graphic card, especially why AMD is pushing so much about the GPU for their APUs, the graphic card is much more efficient and fast for some things.
Please note that modern GPU aren't only for games, thanks to OpenCL and cuda, they can also run some other things.
Also, would a distributed system among a bunch of normal CPUs be better than a single good GPU?
If you put enough CPUs together? Yes. It would be an idiocy of course, you would spend much much more and you would also consume much much more energy. A bit like "can men move these goods faster than a truck?" Ye sure, if you hire enough men... but it is not a good idea
I'm having a hell of a time just trying to figure out how mining software works
It just keep doing SHA256 hashes tons of time. That is why a GPU is faster, a GPU is good at running easy tasks but running tons of them together. A GPU has thousands of "shaders", each one can process things. Sure, each shader can't be compared to a fully fledged cpu, but for simple things, like sha256, is ok. 4 cpu cores vs thousands of shaders.
If I had access to a bunch of low-end CPUs, ( I mean A LOT of them) for basically free, would I be better off using them or buying a good GPU?
Nah, low end CPUs vs beats like a AMD R9 290X? Nah. A single modern GPU would still kickass them and consume much much less.
Note: if you plan to mine bitcoins, get an asic and forget both cpu and gpu.