Energy is (by definition) always conserved.
What happens in a computer is that in order to do computation (in almost all of the computers we use today) you have to move around electric charges. This requires energy and converts ALL¤ of this energy to heat.
¤ Or almost : a tiny fraction probably ends in physical and chemical changes that slowly accumulate and degrade the computer.
It's because a computer is NOT a heat engine : it (typically) runs on electricity and not heat, and it's not the (quantum)"mechanical" work it needs to do in order to do computation that we care about. (Heat engine's mechanical work also often ends up (almost) all dissipated as heat by friction : consider a car moving on a level road.)
Also, by the fundamental principle of energo-informatics, it has to transform some of that electric energy into a form of energy that the observer knows less about (like random movements of particles we call "heat"), in order for the observer to carry computation, which involves at some point losing information about the system (you pretty much have to erase bits at some point). (Our computers are still waaay above the limit this creates - but we might hit it this century !)