Transactions are never cancelled, and there is no refund. However, the sender also does not need to wait for anything to happen before attempting to use their money in another manner, at least in theory.
When a user broadcasts a transaction, it expresses an attempt to move the coins involved. Once that transaction confirms, everyone will agree that that happened. But before confirmation, it is a matter of perspective. Typically, the sender’s wallet will treat the coins as gone as soon as the transaction is created, but as far as the blockchain is concerned, they still reside in the sender’s wallet.
The protocol does not prevent the sender from creating another transaction that spends the same coins, which therefore necessarily conflicts with the first one (through a principle known as Replace-By-Fee (RBF)). Some wallets allow RBF just for the purpose of increasing the fee of a transaction that is happening too slow, but some also allow a user to “abandon” a non-confirming transactions in some circumstances, permitting the funds to be spent in another way.
In short, there is nothing to refund, because as far as the network is concerned, a non-confirmed transaction simply hasn’t happened. It is a matter for the sender’s wallet how to deal with that.