Landauer's principle establishes the thermodynamic lower bound on energy required to erase information from a physical system (e.g. a computer register).
At temperature $T$, the minimum energy needed to erase information is:
$$E = (\text{bits erased}) \times k_B T \ln 2$$
Where $k_B$ is the Boltzman's constant.
The mechanism behind this energy loss comes from the 2nd law of thermodynamics which states that total entropy of a physical system cannot decrease.
For example, the entropy of a 64-bit register that stores some information (e.g. an integer, float, or a pointer) is $S_0 = 64\times k_B\ln 2$. When the register is cleared (e.g. with xor rax, rax instruction) the information is destroyed and entropy of the register drops to $S_1 = 0$. This decrease in register's entropy $\Delta S = S_0 - S_1$ would violate the 2nd law of thermodynamics if entropy didn't increase elsewhere. Therefore, we conclude the entropy was not destroyed, but rather exported from the register to the environment around the regsiter. This entropy increase in the environment manifests itself as heat energy $Q = T \Delta S$.
This means any time a computer destroys information, a small amount of heat is added to the environment. In practice this waste heat is extremely small – a single bit flip in a CMOS circuit dissipates several orders of magnitude more energy through electrical dissipation than through Landaurer's principle!
Erasing a single bit stored at room temperature $T = 300K$ dissipates the following amount of heat into the environment:
$$ E_\text{bit} \approx 2.9\times 10^{-21} J$$
In electron-volts this is:
$$ E_\text{bit} \approx 0.018 \text{eV}$$
This energy is extremely small and comparable to thermal motion of a single molecule at room temperature. In practice, erasing a bit dissipates several orders of magnitude more energy than that.
Any time an instruction is called that destroys information stored in a register or a flag, a Landaurer energy cost is incurred and a small amount of heat is dissipated from the CPU into the environment.
A simple example is a instruction that destroys the information stored in a 64-bit register rax
xor rax, rax
Ordinary CMOS circuits lose energy
A single bit flip in a CMOS circuit loses several orders of magnitude more energy through electrical dissipation (like capacitive switching loss, crowbar current, leakage currents, wire losses, …) compared to the energy lost to heat via Landauer's principle.