Difficulty is a measure of how difficult it is to find a new block. The difficulty rate is continuously adjusted to keep the time between new blocks being discovered at a uniform rate (10 minutes in Bitcoin’s case).
As miners use more powerful technology to improve mining efficiency, the output increases, which increases the difficulty level.
If mining becomes too difficult, and takes too long, the difficulty level will decrease to align output with the uniform rate.
Ensuring a constant output keeps opportunity equal between miners.