"Mining" means collecting, verifying, confirming, and finally packaging and encrypting transaction information that has occurred over a period of time (about 10 minutes) and has not yet been recognized by the network, into a block of transaction record that cannot be tampered with. Thus it becomes a record of transactions that are recognized as ‘Complete’ on the bitcoin network and kept permanently.
Because all the miners are trying to collect the transactions into a block, they need to contend for finding the proof-of-work for blocks, which means they create new blocks. The incentive for the block creator includes the new coins for the block and the fees of transactions contained in the block.
To get the incentive, miners need to work on a kind of mathematical problem based on Hash algorithm. It can be understood as that the answer of the mathematical problem is contained in the new block, once the miner who gets the answer to solve the problem, he will become the creator of the new block and get the new coins and transaction fees.
Every transaction may contain corresponding transaction fee. Transaction fee is the difference between the output value of a transaction and its input value. The miner who “dig out” the new block will get all the transaction fee in it. For current phase, transaction fee accounts for 0.5% or less of the income of a miner.