Transfer of heat either for cooling or heating takes place in three different ways - radiation, conduction and convection.
In convection the heat is transferred from one point to another due to movements of particles of a fluid, that is a gas or a liquid. Particles of all materials expand with increase in temperature. Therefore in a fluid when there is temperature difference between particles of of a mass of fluid the particle at higher temperature become bigger with lower density as compared to particles at lower temperature. This results in particles at higher temperature to rise at top while those at lower temperature to move down. This causes a churning of the fluid.
Vacuum flasks are made on a principle that creating a layer of vacuum between contents of a flask and its surroundings will cut down the exchange of heat between the contents of flask and the surrounding air by creating a thin layer of vacuum around the contents, so that heat transfer rate between the contents of flask and it contents is slowed down.
However, some amount of heat exchange still takes place between the flask and its surrounding by conduction. The heat travels around the walls of the vacuum tube of the flask by conduction. Also the vacuum of the vacuum tube is not perfect and some heat is transferred between inner and outer wall of the vacuum tube through convection also.
Finally, the whole flask is open to the environment, and therefore the outer wall of the whole vacuum flask exchange heat through conduction and radiation. And the air around the flask increases the rate of heat exchange due to convection of the surrounding air.