There are a few reasons why there is only a small atmosphere on Mars. The air that is there is not like air on Earth. Air on Earth is a mixture of oxygen, about 21% and nitrogen, about 78% with the remaining 1% being argon and carbon dioxide. On Mars, the small amount of air is about 95% carbon dioxide and 5% nitrogen with a little of some other gases.
It is so cold on Mars at the poles that much of the carbon dioxide has turned to dry ice and is now solid. Another thing is that the soil there is cold enough to hold onto a lot of carbon dioxide in a sort of weak chemical bond called adsorption. This happens on Earth too, but because the temperature is higher the adsorption is much smaller.
Another reason is that Mars has no magnetic field to speak of. The magnetic field of Earth deflects the charged particles sweeping out from the Sun (the solar wind) and stops them from hitting Earth's atmosphere and carrying it away into space. On Mars, there is not enough of a magnetic field to do this, so much of the atmosphere that Mars might once have had, has been swept away over billions of years. Since oxygen and nitrogen are relatively light gases, they have gone first, while carbon dioxide is heavier and tends to stay behind on Mars.
If people went to Mars permanently and managed to heat up the Martian polar ice caps enough, a lot of the carbon dioxide in them would become part of the atmosphere. This could trap a lot more heat from the Sun and warm the planet still more, but the hard part is getting the first heat into the system. It would take a lot of heat to do it.
If the carbon dioxide in the Martian poles and in the soil were turned back into gas, the atmosphere would be 99.999% plus carbon dioxide with just a trace of nitrogen and other gases. Nitrogen does not freeze or adsorb much under Martian conditions, so most of the nitrogen that is there is already in the atmosphere.
Growing plants on Mars inside greenhouses is very possible if the greenhouses were warm enough and had water supplies. But at present, and for any time in the forseeable future (presuming people do go to Mars permanently) if the greenhouses were removed the trees would freeze and die straight away. Any oxygen they made would stick around for a very long time, but it would eventually be swept into space by the solar wind.
Over a very long period, perhaps hundreds or thousands of years, it may be possible to make Mars warmer and to turn some of the carbon doxide into oxygen. While we can see or guess at ways that this might be done, few or none of them are very practical at the moment. The idea is called "terraforming".
So it looks as if colonists on Mars will have to live in sealed areas for a very long time.
|