Imagine like this. You have 2 transactions on chain. First one is opening a channel. Second one is closing a channel.
I open a 1mio sat channel to you.
I send you 200k sats via lightning.
Now we close the channel.
800k sats will go on chain to me and 200k sats to you. (minus the fees we pay to the miners for including our 2 transactions)
You wouldn't do this for 1 transaction but we might send sats back and forth, or we might use our other channels to forward sats to other channels. Or we might forward sats for other people through our channel to another channel until it arrives at the receiver.
No matter what we do with our channel, on second transaction (close) we both will get the balance left in our channel and the on chain transaction is finished.