Here, the boiling point of water is is 373K and the temperature of ice is smaller than 273K. When we boil, the water is boughtbrought to 373K and when the ice is dropped into the cup, (assuming the temperature of ice is 273K), Thethe heat is transferred from the water (The Hotter substance) to the ice (The colder substance) until their temperature is equal, that is 323K (That is halfwayHalfway between them). So as you can see, Thethe water's temperature keeps on decreasing until both the ice's (or water after the ice has melted) and water's temperature will beare the same, which prevents water from boiling. NOTE
NOTE: Temperature is in Kelvin