Air pressure decreases with altitude. The combined weight of air molecules at increasing altitude decreases. Air pressure is greatest at the Earth's surface, because the surface air molecules bear the combined weight of all the air molecules above.
As altitude increases, individual air molecules can occupy a greater volume of the atmosphere. Because air molecules can achieve increasing distances from one another with increasing altitudes, the air can be described as being thinner, or less dense.
For example, aircraft flying at higher altitudes can face control issues because the air becomes increasingly rarefied. The air molecules can reach such a low density that aircraft control surfaces, such as the wings, ailerons and rudder, can become ineffective.