Difficulty is a measure of how difficult it is to solve a problem on a blockchain. It is used to regulate the rate at which new blocks are added to the blockchain. The difficulty is adjusted periodically to ensure that the rate of block creation remains consistent. The difficulty is adjusted based on the total computing power of the network, so that the rate of block creation remains consistent even as the network grows.