How Mars Lost its Atmosphere
In addition to this, the magnetic field around Mars is very weak and became very weak when the core of Mars became solid. Because Mars is so small, it core could cool rapidly (Earth is 10 times as heavy as Mars, and its core is still liquid, and Earth still has a significant magnetic field). The solar wind, which consists of charged particles is thus not significantly deflected by the magnetic field of Mars and can blow away the upper parts of Mars's atmosphere. This is consistent with observations of heavier isotopes of oxygen and carbon in the Martian atmosphere (Mars atmosphere is 97% carbon dioxide). These processes continue today.
Radiation from the Sun could have separated water vapour into hydrogen and oxygen. Lighter gases would have been preferentially stripped, leaving heaver gases, like oxygen and carbon dioxide. Reactive gases, especially oxygen could have reacted forming silicon dioxide, car bong dioxide, and with iron to form iron oxide, which gives the Martian surface a red colour. As the atmosphere escaped, the greenhouse effect, increased the temperature of the planet, would be less significant. Some water might have turned to ice beneath the surface.