Hot air rises and cold air falls because cold air molecules are densely packed together, making them heavier, and hot air molecules have more space between them, making them warm enough to rise. It is for this reason that hot air balloons move upwards. In addition to temperature affecting air density, humidity plays a role.
When air warms, it absorbs energy from the heat. This energy forces the molecules apart, making them less dense. When heavier cold air sinks to the ground, it forces hot air upwards. Hot air begins to rise until it reaches an area where the density matches its own. The earth's pressure also plays a role in forcing it upwards.
It is possible to observe this principle when a hot air balloon rises. When hot air fills the balloon, it becomes lighter than the air in the environment surrounding it. As the air is cooled, it sinks to the ground again.
When the environment surrounding the air is humid, it is lighter than when it is dry. This is because water displaces nitrogen and oxygen, which are both heavy. As such, the heaviest type of air is cold and dry. When hot and humid air rises, it eventually cools to form a cloud. Because this air is heavy, it begins to fall in the form of rain.