Because Air itself is not an element. it is made up by different elements such as Oxygen and nitrogen. since its made up of a mix of different elements, its rather a homogeneous mixture :)
When heated, the molecules of the liquid in the thermometer move faster, causing them to get a little further apart. This results in movement up the thermometer. When cooled, the molecules of the liquid in the thermometer move slower, causing them to get a little closer together.