This experiment demonstrates Charle's law which states that the volume of a fixed mass of a gas is directly proportional to its temperature provided pressure is kept constant.
The balloon is seen inflating or deflating as the temperature is varied. Placing the bottle in ice lowers the temperature of air (a gas) in it. When balloon is placed on the bottle and the bottle is placed in warm water the temptemperature of the gas is increased. Since volume is directly proportional to temperature the volume increases with rise in temperature. Since the size of the bottle was constant the expanding air fills the balloon making it to expand.
When the bottle is placed in ice again the decreasing temperature causes the volume drop. Hence the deflation of balloon