A payment channel lets two parties transact repeatedly while touching the chain twice: once to open and once to close. The mechanism rests on making the chain the enforcer rather than the recorder.
Opening locks funds under joint control
The parties create a transaction placing funds into an output that requires both signatures to spend, and publish it.
That output is the channel. Neither party can move the money alone, and the chain now enforces that constraint without needing to know anything further.
Before publishing, they exchange signed transactions that would return the funds, so neither can strand the other's money by disappearing.
Payments are re-signed distributions
To pay, the parties sign a new transaction dividing the locked funds differently, and simply do not broadcast it.
Each payment produces another such distribution, and the count is unlimited because nothing is being recorded anywhere except between them.
Either party could publish their copy at any moment, which is what makes the arrangement enforceable rather than merely a promise.
Old states must be made unusable
The obvious attack is publishing an earlier distribution that was more favourable, since it is equally valid from the chain's point of view.
Channels prevent this by giving the counterparty a window to respond to a stale publication with a proof, claiming the entire balance as a penalty.
The defence is economic: publishing an old state risks losing everything, so the rational choice is always to publish the latest one.
Routing extends this beyond pairs
A payment can be forwarded through a series of channels, each intermediary adjusting its own balances rather than moving anything on-chain.
Conditional locks ensure that no intermediary can take the funds without completing its own forward, so the whole path either settles or unwinds.
Capacity is the constraint that shapes the network, since a route only exists where every channel along it holds sufficient balance in the right direction.
The trade-offs are liquidity and vigilance
Funds committed to a channel are unavailable for anything else, so capacity has a cost even when the channel sits idle.
Parties must also be online, or delegate watching to someone else, since the penalty mechanism only works if a stale publication is noticed within the window.
These constraints make channels well suited to frequent recurring payments between parties that transact often, and poorly suited to occasional transfers between strangers.