Opening
Alice and Bob create an on-chain transaction that locks funds in a 2 of 2 multisig output: spending it later needs both their signatures. Say Alice puts in 100,000 sats. The channel now holds 100,000 sats, all on Alice's side.
Paying
To pay Bob 10,000 sats, they both sign a new version of how the channel would be split if it closed now: 90,000 to Alice, 10,000 to Bob. This commitment transaction is kept, not broadcast. The next payment produces a new version, and the old one is revoked.
Cheating does not pay
What stops Alice from broadcasting an old version that gave Alice more? Each revoked version hands the other side a penalty key. If Alice publishes an old state, Bob has a window of time to claim the whole channel balance. Cheating risks everything.
Closing
Normally both agree on the final split and close with one on-chain transaction. If one side disappears, the other can force close alone by broadcasting the latest version, and waits a delay before getting the funds.