All the transactions in the block are taken from the pool, except one, which is the special transaction for the reward, which is put directly in the block by the miner.

This special transaction is called the coinbase transaction, which gives the miner the mining reward when it publishes a new block. The protocol dictates the rules of the coinbase transaction, in order for the miner to not be able to give theirselves an higher reward.

The BTCs are created from thin air, and because of this inflation may be a problem. The halving of the reward is done exactly to solve this problem.