Does BTC refund a fee for a failed transaction?

From the Wiki & # 39; The fee can be collected from a miner who inserts the transaction into a block. & # 39; Wiki

I think it will pay back your fee in a failed transaction. But I can not find another article about it. Is there really a fee back?