How does the Earth's magnetic field protect it from the solar wind? Several sources (see linked questions at the end) say that earth's magnetic field shields us from the solar wind.
The general consensus is that without earth's magnetic field, the atmosphere would be stripped away and life would not be possible.
My understanding is that the solar wind is fairly balanced between positively and negatively electrically charged particles.
Wouldn't this mean that all of the positive particles would be attracted to and sucked into one of the earth's poles, and the negative particles sucked into the other pole? Giving the effect that the earth's magnetic field doesn't protect us from the solar wind at all, it just concentrates it at the poles? If it's merely concentrated at the poles then we still receive the same amount of particles overall than if the earth had no magnetic field, so why isn't the atmosphere stripped? Is it about the direction of travel of the particles?
I know the above paragraph probably contains misunderstandings since evidence that we're still here doesn't line up with the assumption. I only have a basic understanding of magnetism and electric charge, so a good answer would explain how and why I'm wrong in layman's terms. I think my misunderstanding may have something to do with the difference between magnetic and electric fields.
I think the main question I would like answered, more specifically is: What exactly does the magnetic field do to the particles such that they are stopped from stripping the atmosphere?
Earth's magnetic field shields us... from what threat? 
Would a magnetic rod through Mars shield it from solar wind?
 A: It has nothing to do with pressure in the thermodynamic sense nor with virtual particles.  There is an intrinsic magnetic field generated somehow in Earth's core (dynamo discussion could fill volumes) and that field interacts with the magnetic field and charged particles of the solar wind.  Since the solar wind is supersonic, there is a bow shock generated.  This decelerates and deflects the solar wind around the magnetosphere, which stands off from the Earth.  Without this, the solar wind's convective electric field (i.e., basically a $\mathbf{E}_{sw}$ = $-
\mathbf{V}_{sw} \times \mathbf{B}_{sw}$ field due to the motion of charged particles carrying a magnetic field past the Earth) would drag the ionized upper atmosphere off Earth very quickly.

Giving the effect that the earth's magnetic field doesn't protect us from the solar wind at all, it just concentrates it at the poles?

This is wrong, it does protect Earth's atmosphere from the solar wind, as I stated above.  The drift velocity induced by the solar wind's convective electric field on newly ionized particles (called pick up ions) is called the ExB-drift, and it ranges in speed from 10s of km/s to 100s of km/s.  The escape speed from Earth at the surface is only ~11.2 km/s.  Thus, if the ionized upper atmosphere were suddenly exposed to $\mathbf{E}_{sw}$, the ions and electrons would immediately be accelerated up to 10s to 100s of km/s, easily escaping Earth's gravitational field.
A: It is the ozone layer, that needs to be protected, so it can protect us against UV radiation (photons).
It is very important to understand that solar wind is made up by:


*

*electrons

*protons

*alpha particles


The solar wind is a stream of charged particles released from the upper atmosphere of the Sun, called the corona. This plasma consists of mostly electrons, protons and alpha particles with kinetic energy between 0.5 and 10 keV.


https://en.wikipedia.org/wiki/Solar_wind
Now the magnetic field of the Earth, which is produced by the liquid outer iron core (electric currents) of the Earth, extends to space beyond the ionosphere.
https://en.wikipedia.org/wiki/Earth%27s_magnetic_field


The magnetosphere is the region above the ionosphere that is defined by the extent of the Earth's magnetic field in space. It extends several tens of thousands of kilometers into space, protecting the Earth from the charged particles of the solar wind and cosmic rays that would otherwise strip away the upper atmosphere, including the ozone layer that protects the Earth from harmful ultraviolet radiation.


Now the reason we need the magnetosphere is because it protects the ionosphere. Why? Because the ionosphere includes the mezosphere.


The ionosphere (/aɪˈɒnəˌsfɪər/1[2]) is the ionized part of Earth's upper atmosphere, from about 60 km (37 mi) to 1,000 km (620 mi) altitude, a region that includes the thermosphere and parts of the mesosphere and exosphere.  


https://en.wikipedia.org/wiki/Ionosphere

Now why do we need the mezosphere? Because it protects the stratosphere, that includes the ozone layer.


The lowest part of the Earth's atmosphere, the troposphere extends from the surface to about 10 km (6.2 mi). Above that is the stratosphere, followed by the mesosphere. In the stratosphere incoming solar radiation creates the ozone layer.


Now if all the radiation (charged particles) would be deflected, then we would not have an ozone layer, and we would not be protected from UV radiation.


Ultraviolet (UV), X-ray and shorter wavelengths of solar radiation are ionizing, since photons at these frequencies contain sufficient energy to dislodge an electron from a neutral gas atom or molecule upon absorption. In this process the light electron obtains a high velocity so that the temperature of the created electronic gas is much higher (of the order of thousand K) than the one of ions and neutrals. The reverse process to ionization is recombination, in which a free electron is "captured" by a positive ion. Recombination occurs spontaneously, and causes the emission of a photon carrying away the energy produced upon recombination. As gas density increases at lower altitudes, the recombination process prevails, since the gas molecules and ions are closer together. The balance between these two processes determines the quantity of ionization present.


It is very important to understand that the solar wind could strip away the ozone layer.
But your question is about the stripping away of the atmosphere, and why the solar wind does not do that. Now the solar wind exerts a pressure. If this pressure reached the atmosphere, it would strip it away.
Now the magnetosphere has a pressure too, and it counterbalances the pressure of the solar wind.


Earth's magnetic field, predominantly dipolar at its surface, is distorted further out by the solar wind. This is a stream of charged particles leaving the Sun's corona and accelerating to a speed of 200 to 1000 kilometres per second. They carry with them a magnetic field, the interplanetary magnetic field (IMF).[24]
    The solar wind exerts a pressure, and if it could reach Earth's atmosphere it would erode it. However, it is kept away by the pressure of the Earth's magnetic field. The magnetopause, the area where the pressures balance, is the boundary of the magnetosphere. Despite its name, the magnetosphere is asymmetric, with the sunward side being about 10 Earth radii out but the other side stretching out in a magnetotail that extends beyond 200 Earth radii.[25] Sunward of the magnetopause is the bow shock, the area where the solar wind slows abruptly.


So the answer to your question is:


*

*So basically the charged particles are making up the solar wind, but the pressure of the solar wind is what is important, and that the magnetosphere counterbalances it so the atmosphere is not stripped away.

*It is the ozone layer that needs to be protected, to protect us from UV radiation.


Some of the charged particles do get into the magnetosphere. These spiral around field lines, bouncing back and forth between the poles several times per second. In addition, positive ions slowly drift westward and negative ions drift eastward, giving rise to a ring current.


The answer to your question is that most of the charged particles do get deflected.
After the comment, the question is more about the QM level explanation of how the pressure of the magnetosphere deflects the electrons, protons and alpha particles of the solar wind.
Now the magnetosphere has energy, and as the solar wind's particles reach the magnetosphere, the magnetic field of the Earth starts to interact with the solar wind's particles. This interaction is mediated by virtual photons.
Virtual photons are not real photons, they are off mass shell, though, they are a mathematical way of describing the interaction between the field and the solar wind's particles.
Now as the solar wind's particles interact with the magnetic field of the Earth, the magnetic field's energy is transferred to the solar wind's particles as kinetic energy and momentum, via virtual photons, thus the solar wind's particles trajectory, momentum changes so that they move away from the Earth.
