Blockchains of bitcoin and other cryptocurrencies similar to that of bitcoin use proof of work(POW) to keep the blockchain up to date. The mining process; the creation of new blocks by adding most recent transactions data to the blockchain. This is done by computers running the bitcoin or similar cryptocurrencies software code. Every block created comes with a block reward which takes time to be created.
The time it takes to create new blocks depends on random chance and difficulty. Random chance involves miners input data into a hash algorithm to generate an output that meets certain requirements and can never be reversed to give the original set of data.if any input produce an hash that does not meet requirements, miners keep trying until a new hash that meets requirements is produced by adding a number that can only be used once(nonce) to the input.
This random chance correlates with difficulty encountered by miners. lower difficulty means less luck and more difficulty means higher chance of producing hash that meets requirements. Difficulty changes with intervals based on the cryptocurrency's protocol. Difficulty also increases as hardware speed increases.