Bitcoin miners confirm and secure transactions by adding blocks to the blockchain. A block is a group of transactions. The blockchain is Bitcoin's shared public record of transactions. It is a chain of all past transactions. Miners must add transactions to the blockchain so the transaction becomes final. No one is able to reverse a transaction once miners add it to the blockchain.
Miners use the miner fees attached to transactions to decide which transactions to confirm first. A large enough miner fee makes it more likely that your transaction will confirm in a short period of time. If you use a miner fee that is lower than you should have used (or no fee at all), your transaction may take days or even weeks to confirm. The Bitcoin network may reject your transaction altogether and return the funds to your wallet.