Bitcoin Mining

Bitcoin mining is intentionally difficult and resource-intensive so the number of blocks found each day remains steady. Proof of work is contained in each block to be considered valid. Bitcoin nodes verify the proof of work each time they receive a block.
The primary function of Bitcoin mining is to allow Bitcoin nodes to reach a secure, tamper-resistant consensus. A secondary function of Bitcoin mining is to introduce Bitcoins into the system: Miners are paid any transaction fees as well as a reward for newly created coins. This allows new coins to be dissreminated in a decentralized manner as well as motivating people to engage in the mining process.

What is Bitcoin Mining Difficulty?

The Computationally-Difficult Problem
Bitcoin mining is a Computationally-Difficult Problem because the SHA-256 hash of a block's header must be lower than or equal to the target in order for the block to be accepted by the network.

In simple terms, the hash of a block must start with a certain number of zeros. Since the probability of calculating a hash that starts with (multiple) zeros is low, then many attempts must be made to reach consensus.​​​

The Bitcoin Network Difficulty Metric
Bitcoin mining network difficulty is the measure of how difficult it is to find a new block compared to the easiest it can ever be. It is recalculated every 2016 blocks to a value such that the previous 2016 blocks would have been generated in exactly two weeks had everyone been mining at this difficulty. This will yield, on average, one block every ten minutes.

As more miners join, the rate of block creation will go up. As the rate of block generation goes up, the difficulty rises to compensate which will push the rate of block creation back down. Any blocks released by malicious miners that do not meet the required difficulty target will simply be rejected by everyone on the network and thus will be worthless.