A transaction sitting in the mempool has not happened yet. RBF lets you overwrite it: same nonce or same inputs, higher fee, different contents if you wish. Only one of the two can ever confirm.
Use it to speed up a stalled transfer, or to cancel by replacing the pending transaction with a zero-value send to yourself at the same nonce.
Example: a transfer stuck at a 5 gwei tip while the market clears at 45 gwei will not confirm on its own. Rebroadcasting at 50 gwei costs more but resolves it in a block or two. Note that merchants should never treat an RBF-enabled zero-confirmation payment as settled.
Related: mempool, nonce, priority-fee, confirmation