When used like a switch, a transistor will ideally be either "hard on" or "hard off", spending very little time partially on, in the "linear region."
When it is fully on, the effective resistance of the transistor is very low, so the transistor itself will be dissipating little power. When it is fully off it will be dissipating no power since no current is flowing, the effective resistance is infinite.
When you turn a transistor part way on, it can be thought of as having some intermediate effective resistance between the value it would have if it were full on (very low) and full off (very high). Because it is now has some significant effective resistance, there will now be significant power dissipated by the transistor itself, depending on what the net voltage drop is across that effective resistance by whatever current is flowing through it.