Replace-by-fee replaces one version of an unconfirmed transaction with a different version that pays a higher transaction fee. Often, RBF comes into play when a particular transaction is desired to be confirmed faster.
Bitcoin supports the concept that an unconfirmed transaction may be modified and reissued. Transaction replacement has been a critical element of the Bitcoin protocol since inception.
When a user replaces a transaction by fee, the previous transaction outputs and inputs are kept -- the only difference is a higher fee as an incentive for miners.