Rabba and Rabbi Zeira happened to come to the house of the Exilarch on Shabbat, and saw this servant who placed a jug [kuza] of cold water on the mouth of a kettle filled with hot water. Rabba rebuked him for having acted contrary to the halakha. Rabbi Zeira said to Rabba: How is this case different from placing an urn on top of another urn, which is permitted on Shabbat? Rabba said to him: There, when he places one urn on top of another urn, he merely preserves the heat in the upper urn; therefore, it is permitted. Here, in the case where he places the jug of cold water on the mouth of a kettle, he is generating heat in the water in the upper vessel; therefore, it is prohibited.
Some commentaries explain that the Gemara is not discussing a kettle on the fire. Rather, the servant sought to place the jug on top of the kettle and insulate them both together. Rabbi Zeira was of the opinion that this is permitted, while Rabba maintained that since the hot water in the kettle will heat the water in the jug, it is not merely insulating, but tantamount to cooking (Rabbeinu Yonah).
As far as halakha is concerned, it is prohibited to place a jug of cold water atop a hot kettle on Shabbat. This applies, however, only to a situation where the water in the jug could be heated to the point that one’s hand would spontaneously recoil from it. Any other conclusion would contradict earlier conclusions of the Gemara with regard to heating water (Tosafot; Ran; Shulḥan Aruk, Oraḥ Ḥayyim 318:17).