This is the best feature of the Sandvich!
It works exactly like a health pack. It's great to be able to give a Medic your Sandwich, since he does not have a quick way to self heal.
The Sandvich will regenerate after a cooldown, or can be instantly recharged by visiting a Resupply cabinet, picking up your own thrown Sandvich, or collecting any health pickup while at full health.
Do note that you cannot replenish health by dropping your own Sandvich and walking over it, you will simply pick it up again. You can however pick up another Heavy's dropped Sandvich, which will restore health as per normal.
Just be careful the enemy can't get to it first: It can also heal them.