Mining is the process by which cryptocurrencies secure the issuance of new coins and process all transactions in the network. Bitcoin was the first cryptocurrency to implement mining in the form of proof-of-work: users had to contribute their computing and electric power in order to process transactions in the Bitcoin network. After producing proof of the work that they have done, they would receive a compensation in the form of bitcoins. Since then, many new cryptocurrencies have appeared, and each of them makes use of mining. There are alternatives to the proof-of-work algorithm, the second most popular one being proof-of-stake. However, the ultimate goal of mining in every cryptocurrency is always the same: creating new coins and processing transactions.