The CORE is not necessarily spinning, but the PLANET is. It's the rotation of a magnetic core that causes the field. Though we don't know if that's even correct, it's the most plausible theory we have. It might even be "core spinning with relation to planet". And the weather patterns? Core has no effect on that. Magnetic field has no effect on that (directly). The magnetic field keeps the planet from cooking by high-energy EM radiation, which keeps us from developing as much cancer and, you know, dying. And heating the core will, if anything, remove the magnetism from the core. Not something we want. There needs to be a solid core, made primarily of strong paramagnetic elements (Ni and Fe are the best) with a large magnetic charge applied to it. Even if it's not spinning, it might provide a field, but we don't know. And yes, it is possible to artificially create one, but it might take too much energy to maintain (we'll have deflector shields before we have that, and yes, they would be the same technology, save for scale).
Yes, this is a very, very hard thing to do.
@veekie: I know it's common, but I don't think comets will have a large enough concentration to be viable. I'm pretty sure comets are mostly Ni, Fe, and H2O, with some other frozen gases (some ammonia (NH4), but not that much).