Relaxation oscillator
Heating IS produced inside the transistor. You can easily calculate how much (voltage &times; current, averaged over time), and show that it is well within the transistor's ratings.

You can't substitute a zener diode for the transistor, because it doesn't have the negative resistance characteristic that the transistor has.