Answer
The smoke is composed of hot air and is less dense than the nearby air. It floats upward.
It cools by conduction and mixing with the surrounding air. In cooling, it becomes more dense, and when its density matches that of the air around it, it will no longer tend to rise.