Diffusion In Small Containers:
Imagine a stiff enclosure, like a glass jar, from which all the air has been pumped. Assume that this jar is located somewhere out in space, very far away from the gravitational effects of planets and stars and where space itself is a close to vacuum (as compared with conditions on Earth anyhow). Assume that the temperature is similar as that in a typical household. Now assume that a certain quantity of elemental gas is pumped into the jar. The gas distributes itself rapidly throughout the interior of the jar.
Now assume that another gas which does not react chemically with the first gas is introduced into the chamber to mix with the first gas. The diffusion procedure takes place rapidly; therefore the mixture is consistent throughout the enclosure after a short time. It happens too fast as the atoms in a gas move around furiously, frequently colliding with each other, and their motion is too energetic that they spread out inside any container of reasonable size as shown in figure below.
Figure: (a) Distribution of gas inside a container. (b) Distribution of gas about a planet with an atmosphere. (c) Distribution of gas in a star is forming. Darkest shading indicates highest concentration.
What would occur if the same experiment were performed in the presence of a gravitational field? As you can estimate, the gases would still mix uniformly inside the jar. This takes place with all gases in containers of reasonable size.
Planetary atmospheres, like that of our own Earth, consist of mixtures of different gases. In case of our planet, around 78% of the gas in the atmosphere at the surface is nitrogen, 21% is oxygen, and 1% is made up of many other gases, involving argon, hydrogen, carbon dioxide, carbon monoxide, helium, ozone (oxygen molecules with three atoms instead of the normal two), and tiny quantities of some gases that would be poisonous in high concentrations, like methane and chlorine. Such gases blend uniformly in containers of reasonable size, even though some of them have atoms which are far more massive than others. The Diffusion, again, is responsible.