I'd like to clarify bandmanjoe's answer a bit. In the original question, the ice is wedged into the beaker, not "stuck" to it. The piece of ice will stay wedged until enough of it has melted to reduce its size, at which point it will float to the surface.
The length of time this takes depends on the mass and the initial temperature of the piece of ice (which, contrary to the first answer, could be considerably colder than zero degrees C), the mass and temperature of the water added, and the amount of heat added.
Heat does not, as bandmanjoe says, "go to the cold". Heat is how we express the motion of molecules. All molecules above absolute zero are in constant motion. As molecules bump into each other, some of that kinetic energy can be transferred from one particle to another; this results in heat transfer by conduction.
Mathematically, the ice and the water in the question above can be treated as a system, where the amount of heat energy lost by the water is equal to that gained by the ice, with gained energy going first to bringing the ice temperature up to zero degrees, then to the phase change from ice to water, and then to heating that water until it is in equilibrium with the rest of the water.
When the ice is first inserted into the beaker, the ice is at zero degrees Celsius, while the interior of the beaker is at room temperature, probably around thirty-five degrees Celsius. The general trend is for the heat to go to the cold, because the cold is to be regarded more like an absence of heat. So when you get two materials that contrast in temperature greatly, the heat will go to the cold in an effort to create an equilibrium. This transfer of heat energy momentarily causes the ice to "stick" to the glass of the interior of the beaker, until enough solid ice melts and changes to water, which is still relatively close to zero degrees Celsius. When you add water, the ice will still remain "stuck" to the bottom of the beaker, until enough liquid water is present to separate the cold surface of the solid ice and the solid surface of the glass in the beaker.
ok but i like bandmanjoe's answer better but thank you