Earth is constantly bombarded by cosmic rays coming from space. The high energy cosmic rays destroy cells and causes DNA mutation. Cosmic rays also remove air molecules to outer space by sputtering process. If we lose air, we can not live on Earth.
The inner core of the Earth is composed of molton metal elements and their motion via convection generates magnetic field (Fig. 1.7). This magnetic field shields the entire Earth and deflects the charged cosmic rays and protects us from them.
Mars has almost no magnetic field (magnetic field strength is about 1/10000 of Earth) and lost significant amount of air by sputtering process.
Fortunately, the Earth has just right amount of metals in its core and produces a magnetic field that prevents loosing air molecules to outer space and protecting us from harmful cosmic rays.
Fig. 1.7 – Earth’s magnetic field protects us from harmful cosmic rays