study bitcoin
The difficultly adjustment in mining is one of the most intriguing aspects of bitcoin. As more miners start hashing to find the next block, bitcoin auto-adjusts itself to be more difficult to find the block. If miner fall off, it will become easier. This keeps the average time to find a block to ~10min. There's a beautiful dance of numbers are the hash rates rises and falls.
Somewhat counter-intuitively, the difficulty number goes down as the difficulty goes up and vice versa. This is because miners must find a valid has that is at or below the current difficulty for a valid block to be confirmed. The difficulty has a number of leading zeros (the number is always a fixed length). The more hash, the more leading zeroes.
As an example of how this works, use this site (https://emn178.github.io/online-tools/sha256.html) to try and find an input that results in the output hash having just three leading zeros. Using ";jcjvae;oiucahn;sdln" as an input results in the hash "00b4563a02ba8dad5825dc6147268d278d084b24aaf2a2dff9239f569b27dabb". This would not satisfy the three leading zeros so would not be a valid hash that meets the difficulty.
This is how Proof of Work works.
(Originally shared elsewhere but seemed relevant to this territory)