Joule's law (according to James Prescott Joule) says that in an electrical resistor, the heat generated is proportional to the electrical power and time converted there
If a current of strength I flows through a resistor R when voltage U is applied during time t, then the current work
W = U ∙l ∙ t = l2 ∙ R ∙ t
converted into heat.