Transaction fees are paid to miners by the sender of a transaction. This money rewards miners for the work they do in putting transactions into a specific order and adding them to new blocks to be added to the list of transactions known as the blockchain.
Transaction fees have a dual purpose in Bitcoin. First, they protect the network against attacks by increasing the cost of creating spam transactions. Second, they give miners an incentive to include one's transaction in a block. The miners can collect the transaction fees from all of the transactions that are included in their blocks. They are thus incentivized to include transactions that pay higher fees. Transaction fees will also pay miners to continue to operate once the block subsidy reaches zero.
Transaction fees are often expressed as a fee rate. The units are typically satoshis/byte, satoshis/kilobyte, or Bitcoin/kilobyte. Transaction fees are not paid in relation to the value being transferred but rather the size in bytes of the transaction data itself. Miners often choose transactions to include by the transaction fee rate rather than the value of the transaction fee itself.