At http://phys.org/print387182978.html … the magnetosphere shields earth from the solar wind (or plasma injections) but at Earth's poles the field lines are open – like those of a bar magnet. Hence the solar wind is able to descend towards the earth's surface. However, just as particles can head downwards so too can particles ascend upwards – ions from the earth's atmosphere (the ionosphere). The question of plasma transport and atmospheric loss is relevant not just to planets we may note but to stars also. The interaction between incoming and outgoing material in Earth's magnetosphere is a hot topic at the moment, so we are told (and you wouldn't have know this if you had accepted former confident statements on the subject. Where exactly the stuff is coming from and how it entered our patch of space is yet to be deduced satisfactorily. Initially scientists assumed earth's magnetic environment was filled primarily with particles of solar origin. Observation has shown sporadic but powerful injections of plasma (in the form of plumes) growing within the plasma spike and travelling outwards to the edge of the magnetosphere and interacting with solar wind plasma entering the magnetosphere.
The article then moves on to magnetic reconnection, the current mainstream theory of plasma movement. It is well worth reading the four pages of text at the link above. Interesting times as they say.
The article was published in the Journal of Geophysical Research: Space Physics (2016) and the information was provided by ESA.