When current I flow through a resistor of electric resistance R, heat is produced. The heat produced H depends directly on the square of the current, resistance and time t for which the current is allowed to pass.
H=I^2Rt, Is called Joule’s law of heating.
SI unit Heat energy: joule