Among the minority are the greenhouse gases, carbon dioxide being the most prominent of them all. These gases are presently cast as harmful to the planet, being the primary cause of global warming. Of course, they’re only harmful because they’ve exceeded their ideal levels. Anything that comes in excess is not good, right?
At ideal levels, greenhouse gases play an important role in keeping our planet warm enough for us and other organisms to live comfortably. Unfortunately, the rapid rate of industrialization has caused greenhouse gases to accumulate, forming a layer too thick for infrared radiation (which originally came in from the Sun as solar radiation) to escape.
The different gases in the atmosphere actually make up five principal layers. Starting from the lowest layer, there’s the Troposphere, followed by Stratosphere, then the Mesosphere, then Thermosphere, and finally the Exosphere.
The peak of Mount Everest, high as it is, is still part of the Troposphere. The Stratosphere is the layer at which most weather balloons fly. The Mesosphere is where meteors mostly ignite. The Thermosphere is where the International Space Station orbits.
Since the Karman line (which serves as the boundary between the Earth’s immediate atmosphere and outer space) is found in the lower region of the Thermosphere, much of this layer of gases in the atmosphere is considered outer space. Finally, the exosphere, being the outermost layer, is where you can find the lightest gases: hydrogen and helium.
Many properties of the gases in the atmosphere are dependent on the altitude at which they are found. For instance, average density of these gases generally decrease as one rises to higher altitudes. As a result, the pressure (being due to the collisions of the particles that make up the gas) also decreases in the same manner.
Since the force of gravity pulls down on the masses of these gases, the heavier gases are typically found near the surface of the Earth while the lightest ones (e.g. hydrogen and helium) are found in higher altitudes. All these properties are just generalizations though. Temperature and fluid dynamics also influence these properties.