This image explains it better than I can: https://3c1703fe8d.site.internapcdn.net/newman/gfx/news/2017...
I don't think an approach like this would work for the moon, because there's no stable Lagrange point between the moon and the sun. (And even if we did build a magnetic shield for the moon somehow, I think it's still too small to accumulate an atmosphere.)
Beyond that, the moon is generally much less suited for long term habitation than Mars is for several reasons. I won't get into details about that right here (unless you want me to) and Mars isn't exactly a cakewalk either, but the moon poses a more significant challenge in many ways.
That said, I welcome any kind of manned missions/outposts/colonies etc, whether the be on the moon or Mars or somewhere else entirely. I just believe that the payoff for starting on Mars could be much greater than doing the same on the moon.
No, it's the other way around -- for a sustainable atmosphere, one needs a magnetic field.
> If it doesn't require an atmosphere, could this approach be used to build a magnetospher around the moon?
That would have an effect on surface radiation from charged particles, but the moon can't have an earth-like atmosphere because of its low gravity. So the payoff is smaller.
More details: http://arachnoid.com/restoring_mars
If it doesn't require an atmosphere, could this approach be used to build a magnetospher around the moon? It feels like colonizing the moon first is a much easier and more useful problem to tackle. Once we have a moon colony you can crack water to make fuel and then go "where ever" you'd like - other asteroids, or mars. The moon is much closer and easier to get to, though maybe people need the "excitement" that travel to Mars connotates.