Overview
It may be easier to understand a linear regulator by seeing a simplified schematic of one:
simulate this circuit – Schematic created using CircuitLab
(IC regulators are much more sophisticated. For example, the above schematic has no short-circuit protection, no thermal protection, and its output voltage will vary with the ambient temperature -- to name just a few of its problems. That said, it does actually regulate the output voltage.)
Discussion
On the left is just the bare schematic. On the right, I put a little box around it so that you can more easily see the three terminals of a 3-terminal regulator and what's inside and outside of this simplified version of one.
\$Q_1\$ does the actual job of dropping voltage from the unregulated power supply rail (called \$V_\text{unreg}\$ above.) It's collector is nailed to the unregulated supply, but its emitter voltage is the regulated output. Because of that fact, almost all of the needed dissipation takes place in \$Q_1\$ since all of the load (not shown) current must come through \$Q_1\$ and \$Q_1\$ will be controlled by the rest of the circuit shown so that it drops just the right amount of voltage to perform the regulation job.
Resistor \$R_3\$ supplies the needed base current for \$Q_1\$ (plus a little more.) Resistors \$R_1\$ and \$R_2\$ provide a simple voltage divider that divides the regulated output voltage (\$V_\text{reg}\$) by some desired factor. So the node wire between \$R_1\$ and \$R_2\$ present a fraction of the regulated voltage to the base of \$Q_2\$. Meanwhile, the emitter of \$Q_2\$ "observes" the diode voltage of \$D_1\$ (which is presumed to be relatively constant regardless of changes in the current through it) and compares it with the base voltage provided by the resistor divider pair.
If the voltage at the resistor divider pair increases, this causes \$Q_2\$ to increase its collector current. But that causes a larger voltage drop across \$R_3\$ and that pulls downward on the base of \$Q_1\$ (which causes its emitter to similarly move downward.) This change "corrects" the output voltage by lowering it and that causes the voltage at the resistor divider pair to return to where it should be.
If the voltage at the resistor divider pair decreases, this causes \$Q_2\$ to decrease its collector current. But that causes a smaller voltage drop across \$R_3\$ and that pulls upward on the base of \$Q_1\$ (which causes its emitter to similarly move upward.) This change also "corrects" the output voltage by raising it and that causes the voltage at the resistor divider pair to again return to where it should be.
That's how it works. But the basic answer to your question is that \$Q_1\$ is continually adjusting itself (via this closed loop circuitry arrangement) so as to maintain the regulated output voltage. It does this by dropping more or less voltage across itself (between its collector and emitter.) And since the entire load current must pass through \$Q_1\$, its dissipation will be the product of this voltage drop times the load current (plus a little extra for the base current component.) It's not quite like you write it (shorting it to ground.) But I suppose your writing gets a point across.
(It's not terribly important for this discussion but some added dissipation also occurs in the surrounding circuitry. For example, \$R_3\$ may dissipate 10% as much.)
Summary
Linear IC regulators work similarly to the above. They just do so with much better circuitry designed to handle a host of problems that users commonly want addressed. These are things like providing a precision output voltage that doesn't vary much with ambient or operating temperatures, doesn't age over time, is relatively immune to unregulated supply voltage variations and ripple, won't explode or burn up if someone uses a screwdriver to short the output to ground, etc. The usual things people expect from a good regulator.