The magnetopause is the layer that acts as the Earth’s shield from the solar wind. It is found between the surrounding plasma and magnetosphere or the magnetic field. The surface of the magnetopause has a complex shape. It flaps, ripples, and moves in different directions, inward or outward, depending on the solar wind conditions. The magnetopause changes its shapes as a response to the solar wind. The shocked solar wind or the magneto sheath plasma is able to flow around the complex shape of magnetopause.
In a general sense, the magnetopause is considered as the outermost layer of the region controlled by the magnetic field of a planet. It is where the solar wind plasma counterbalances a planet’s magnetic field which naturally creates an outward magnetic pressure. You can imagine magnetopause as the boundary that separates magnetosphere and the magneto sheath.
When magnetosphere is created during the interaction of the solar wind and a planet’s intrinsic magnetic field, most of the solar winds’ charged particles are being deflected on the sides of the magnetopause. However, the shield that magnetopause provides planets is not a full proof. Some of the particles may still enter successfully. When it happens, the particles get trapped in the magnetosphere forming what the scientists call the Van Allen radiation belts.