A bitcoin transaction that has been broadcast but not confirmed is not final and can be replaced. Replace-by-fee is the rule set that decides when a network node will accept the new version.
Why transactions stall in the first place
Broadcasting a transaction puts it in each node's pool of unconfirmed candidates. Miners select from that pool by fee rate, so a transaction priced below the clearing rate simply waits.
Waiting is not a defect but the queue working as designed. The transaction remains valid and can be mined at any later point when demand falls back.
Nodes eventually drop very old unconfirmed transactions from memory, at which point the funds have never moved and the sender is free to try again.
The replacement rule
Replace-by-fee lets a sender rebroadcast a transaction that spends the same coins but pays a higher fee. Nodes accept the new version and discard the old one from their pool.
The replacement must pay enough extra to cover both the higher rate and the bandwidth the network spent relaying the original. This prevents cheap spam from cycling endlessly through the pool.
Only one version can ever confirm, because both spend the same inputs. Once a miner includes either, the other becomes invalid everywhere.
Signaling and the two versions of the choice
Historically a transaction had to mark itself as replaceable, letting recipients see in advance whether the sender retained the option. Wallets exposed this as an opt-in setting.
Node operators may also relay replacements regardless of that marker, since nothing in the consensus rules forbids a miner from taking the better-paying version.
The practical consequence is that a recipient should not treat the absence of a marker as a guarantee. An unconfirmed payment is a proposal, not a settlement.
When the recipient can bump instead
A receiver who is waiting on incoming funds can spend the unconfirmed output in a new transaction that pays a high fee. Miners must include the parent to collect on the child.
This child-pays-for-parent approach works because miners evaluate the pair as a package. The combined fee rate is what matters, so a generous child drags a stingy parent along.
It is the tool of choice when the sender has vanished or their wallet lacks a bump feature, since it needs no cooperation from the other party.
What this means for point of sale
American merchants accepting bitcoin directly face a decision about how long to wait. Treating an unconfirmed transaction as paid is a commercial judgment about the size and reversibility of the sale.
Payment processors handle this by absorbing the risk themselves, quoting the merchant a settled amount and managing confirmation policy behind the scenes.
The underlying reality does not change with the interface. Finality on this chain is probabilistic and arrives with confirmations, so anything before that is an expectation rather than a receipt.