When a substance is heated, it expands and its volume increases. The substance now has a lower density. Thus, hot water is less dense than cold water. Similarly, hot air is less denes than cold air. The hot and less dense parts of the liquid or gas will rise while the surrounding cooler and denser parts will sink. Thus, convection currents are set up which transfer heat from the hotter regions to the cooler regions.
In a fire, the not gases above the flame rise. Denser, cooler air from the surroundings rushes in to take its place.