I am still learning so my terminologies might not be entirely accurate. But I understand that in the traditional model, if person A pays person B $10, then the banks subtract $10 from person A's account and add $10 to person B's account. This "spreadsheet" is owned by the banks. With blockchain, this transaction is recorded on a "decentralized network" of ledgers. The cryptocurrency miners dedicated their computers CPU to do number crunching to keep all copies of the ledgers synchronized. So for that, miners are compensated. Where does this compensation come from? Who pays the miners?
person A pays person B $10, all the blockchain ledgers will record that transaction, i.e. subtract 10 from person A's account, add 10 to persons B's account.
There are no accounts in the Bitcoin network. Bitcoin is cash, not a bank account.
The Blockchain is a transaction journal, it is not like an accounting ledger.
Bitcoin nodes do not keep track of other people's "balances". They only keep track of unspent coins (unspent transaction outputs or UTXOs).
For A to send 10 BTC to B, A has to find one or more coins whose values sums to more than 10 BTC. Lets say they have a coin worth 13 BTC. They include in their draft transaction one input coin of 13 BTC and two output coins of 10 BTC to B and 2.99 BTC change to themselves. The remainder 0.01 BTC is collected by the miner as the transaction fee.
As well as collecting the transaction fees for all transactions in the block they have mined, the miner also gets to create a totally new amount of money called the block reward or mining reward.
As @Flow lined out, the new coins are generated "out of thin air". However this only works because the miners put a lot of computing power into the process of validating the next block (or how beginners would say: "solving the puzzle"). The bitcoin protocol makes sure, that miners devote a lot of effort (dynamically adapting so that only every ~10 minutes a new block is validated) to retrieve the block reward (currently 6.25 Bitcoin).
Additionally, every node in the network can verify very easily that the miners DID use this enormous amount of computing power (e. g. energy) to find the next valid block. This way it is ensured that only the allowed amount of coins get paid out to the miners.
So yes, the new Bitcoin are generated "out of thin air" but - contrary to our corrupt fiat money system - you have to prove that you did go through a lot of effort to receive the coins!
BTW this is why you should run your own node ;)
Each block must include a coinbase transaction. The coinbase transaction must be the first transaction in the block and pays the block reward to the block's author. It is also special in that it does not spend a UTXO in its inputs and that only coinbase transactions may have a bigger total value for the outputs than its inputs.
The compensation of miners is composed from two sources. Each block mints a limited amount of new bitcoins and collects the transaction fees of the transactions they include in it.
The block subsidy started at ₿50 per block, and halves every 210,000 blocks. We're between the third and fourth Halvening. Currently, each block mints ₿6.25 new bitcoins. The block subsidy doubles as both the initial distribution mechanism of all bitcoins and as an incentive for miners to secure the Bitcoin network while it is bootstrapping.
The second part of the block reward stems from the transaction fees. Since Bitcoin blocks are limited to 4,000,000 weight units (WU), users bid on the available blockspace by offering transaction fees. Most nodes only relay transactions paying at least 0.25 satoshi/wu, which means that a full block should collect at least 40 mBTC in transaction fees. When a lot of transactions are competing for inclusion in blocks, the feerates of transactions can be significantly higher than this, though. E.g. for the first half of the 2021, the queue of unconfirmed transactions never emptied out completely, and transaction fees amounted to more than ₿3 on several blocks.
As the block subsidy continues to halve, the transaction fees will make up an increasing amount of the total block reward—unless people stop transacting on Bitcoin.
Miners use ASICs for Bitcoin and CPUs are not profitable anymore.
Miners get fees in each block mined, fees are required for Bitcoin transactions and decided by users. They also get subsidy which is 6.25 BTC right now and reduced 50% after every 210,000 blocks.
Related answer which covers basics of mining: https://bitcoin.stackexchange.com/a/103488/
Compensation from miners comes from two concepts:
The Block Reward on blocks they validate, whereby new coins are minted for the miner, in accordance with the blockchain's protocol. Bitcoin's current reward is 6.25 BTC. (The reward began at 50 BTC and is halved every 4 years.)
Transaction Fees granted by users. On each transaction included in a block, users may specify a fee amount which goes to the miner, as an enticement to include the user's transaction in the block assembled by the miner.
Blocks have limited space for transactions, so miners will sort "transactions waiting to get on a block" and fill their block with the highest fee-paying transactions first. These transactions waiting to be confirmed (so called Mempool transactions) are only confirmed when included in a miner's block, and that block is validated & added to the blockchain by consensus of the majority of mining peers.
Until mempool transactions are added to a block, they are essentially only "transaction requests" by users. These transactions requests become official only when they are included in a block, and final only when the block they are included in is at least several blocks deep (6 is the usual number suggested). This is because blockchain forks can happen, but as new blocks get added to the chain, it becomes exponentially more difficult for a fork to orphan previous blocks.
It is worth noting that there is only one, unique, so-called 'coinbase' transaction in each block. It is in this Coinbase Transaction that the miner awards themselves the Reward coins, plus the sum of the fees of the other, regular transactions the miner is including in the block. If the miner is first to validate their block and it gets permanently added to the blockchain, they will have earned the total amount awarded themselves in the coinbase transaction.