We have a hot piece of metal that is put in water, and the metal and water are allowed to come to an equilibrium. We can consider that no heat is lost. So the amount of heat that the piece of metal is losing, is gained by the water. The piece of metal is heating the water. We can write that as:
Q water = - Q metal
Then the general formula for the heat of anything is:
Q = m * C * ΔT
So:
Qwater = - Qmetal
mw * Cw ΔTw = -