The flipping of the magnetic poles doesn’t mean the Earth will not have a magnetic field anymore. Let's work this out with a compass. At the moment, your compass has a nice little red arrow pointing North. When a full geomagnetic reversal takes place, the arrow will point South. But in between these two events, there is a chaotic period where multiple poles might form at once, confusing your compass and even the animals that use the magnetic field for navigation. This is a messy time and the strength of the field could be up to 20 percent lower than it currently is. Also, the flip doesn’t happen overnight. The chaotic period during the reversal can last thousands of years or, at the very least, a few hundred years on some rare occasions. And sometimes, the magnetic field gets close to a reversal and then goes back.
The earth magnetic pole get reverse after millions of year?
It is not like that magnetic pole get reversed only.
Pole are shifting every year. In large time like millions of years it can be a possibility that pole flip. Cause of this is just in simple words is solar radiation.
The reversal is explained by dynamo theory (see https://en.wikipedia.org/wiki/Dynamo_theory and reference No. 22 therein). The physics behind this is rather complicated and is also connected to the mathematical description of chaotic behaviour of a system. I have seen a demonstration of a mechanical model of a dynamo with sudden reversals of chaotic behaviour.
Solar radiation is not the cause, but the process of reversal will have a large effect on solar radiation reaching the surface of the Earth and thus for life on Earth. During the reversal the radiation exposure will be much greater than now, because Earth's magnetic field will be much weaker. After the reversal, the magnetic field will again save life from too much cosmic radiation.
Reversals of polarity are part of long-term secular variation of the Earth's magnetic field. The dynamo in the Earth's core is just as capable of generating a magnetic field of one polarity as the opposite. At the same time, the dynamics of the core give a field that is time dependent and tending to prefer orientation of the dipole part of the field roughly aligned with the Earth's rotational axis. At the same time, the field can't be perfectly symmetric -- there is a theorem on this due to Cowling. What results form all of this is a magnetic dipole that essentially "orbits" the rotational axis in an irregular way. Sometimes the orbit becomes large, taking the pole across the equator. The dipole (of opposite) sign then begins again to orbit around the rotational axis. The whole process resembles the two-pole strange attractor diagram often seen in books on chaos.
The Carrington event changed the north pole abruptly. Since then it has traveled 39 degrees. Another superflare can change the poles. All Sun like stars have superflares.