When a miner discovers a block, the miner may award themselves a certain number of coins, which is determined by the rules of the network.
On many networks, the miner is also awarded the fees paid by users sending transactions. The fee is an incentive for the miner to include the transaction in their block.