Why does water bubble if you put it in a flask and cover it up and put ice on top of the glass?

ok….ill try to simplify the question… ok first u have to add semi hot water to a clear glass cup with a narrow tube on top. you cover the hole on top and tip over the water. then u start rubbing ice on top of the glass…why does it start to bubble on the bottom even when it is about 40-50 degrees celcius?