When molecules become hotter, they move faster. For solids and liquids, this movement is limited to vibration as the molecules are held together by attraction forces. Think for example of a crystal structure.
Molecules in gases - and mixtures of gases such as air - can move freely and if they are not trapped in a container, can move further away from other molecules. They occupy more space, or we say the gas has expanded.
The amount of gas (the mass) has not changed, but the volume it occupies has increased, so the density has decreased. This explains for example how hot air balloons can rise, or why warm air rises, and creates on shore and off shore winds.
#PV = nRT#
#P/(RT) = n/V#
#V#, then divide by #RT#)
#bb(rho) = bb((PM_m)/(RT)) = (nM_m)/V#
Therefore, for a freely-expandable system, the volume can increase (since the particles can more easily move farther away from each other), which would correspond to a decrease in density (