Mining cryptocurrency involves verifying other transactions on the blockchain, and is typically done on a powerful server with a high-end graphics card to work through the necessary calculations as quickly as possible.
Blockchain is a public ledger system that is a key element of cryptocurency (i.e. Bitcoin) and essentially it is series of transactions. (i.e. sending/receiving money). All those transactions are collected and put together into what is known as a block. That block is attached to another following block etc. like in a chain, thus blockchain.
The creation of that blockchain and ledger system is done by miners. Miners are essentially running a piece of software which runs on (originally for Bitcoin, then it became a standard for all other currencies) any computer. Over a period of time it became something that could only run on powerful, high end computers and now these are very specialized devices that are purpose-built for mining.
Whether using a computer or a specialized mining device, miners are volunteering their work or their computer/speicialised device, to power that network. As a result, since they’re creating it by mining, all miners jointly own that network. Once one of those blocks is written down and another one follows, there is a block reward. The block reward varies from one coin to another and it also varies over time.
Blockchains and the block reward
The core of mining is the idea of block rewards. For most coins, these are given to the person/group that finds a valid solution to the cryptographic algorithm. This solution is a mathematical calculation that uses the results of previous block solutions thus there is no way to pre-calculate answers for a future block without knowing the solution to the previous block. This history of block solutions and transactions constitutes the blockchain, a public ledger system.
A single block contains cryptographic signatures for the block and the transactions within the block. The transactions are collected from the network, typically with a small fee attached, which also becomes part of the block reward. There is a difficulty value attached to the solution for a block as well. This value can go up/down over time in order to keep the rate of generation of new blocks fairly constant.
For different cryptocurrencies the target to generate a block solution varies. The number solution has to be less than a value and includes the wallet address where are all transaction fees along with the block reward are received. Once that is done, the block gets written to the blockchain of all participating systems.
Setting up the software
There are many options for cryptocurrency mining. Some algorithms can still be run more or less ‘effectively’ on CPUs (eg, Cryptonight), others work best on GPUs (Ethereum, Zcash, Vertcoin), and still others are the domain of custom ASICs (Bitcoin, Litecoin). But besides having the hardware, there are other steps that need to be taken to get started with mining.
In the past it was possible to solo-mine the algorithms by downloading a wallet for a particular coin and mining software then dedicate a CPU/GPU/ASIC to calculations. The goal was to find a valid block solution first. Each time a block was found, the calculations restart, therefore it was beneficial to have good hardware to search potential solutions more quickly.
Today a majority of miners have given up running wallet software since it takes up disk space, network bandwidth or they don’t even need it for mining. There are websites that take care of software if you find a secure host.
Over time Bitcoin and other currencies increased in popularity and eventually solo-mining became impractical. If you provide 1% of the total computational power for a coin, then typically 1% of all blocks are found. However, if due to popularity, someone can only provide 0.00001% of the mining power, and value keeps decreasing over time, the chances of finding valid block solutions are reduced to almost zero.
Block rewards have become the domain of large mining guilds, called mining pools. For blockchain security reasons, it is not recommended that any single group—a mining pool or an individual— control more than 50% of the computational power (hashrate) for the coin network, but for mining purposes, being in a bigger pool is almost always better.
Unlike block rewards where everything goes to the winning system, mining pools work together and distribute the rewards among all participants, usually based on a percentage of the mining pool hashrate. The hardware gets smaller portions of work from the pool, and submits those as shares of work. Even if the contribution is only 0.00001% of the hashrate, there is still that percentage of every block that pool solves. There are calculators for cryptocurrencies showing how much somebody can potentially earn from mining, but it is better to join a mining pool.
Doing the mining
Aside from having the right hardware and joining a mining pool to actually mine, the appropriate software and settings for the hardware is needed.
Most pools will provide basic instructions on how to get set up for mining, including where to download the software. However, not all software is the same and many factors can affect mining speed so it’s very useful to read up online in places like Bitcointalk, Github, and other forums.
The easiest way to mine a coin is to just point all your mining rigs at the appropriate pool and load up the necessary software. The ‘best’ coin for mining is often short-lived and switching between coins can take a lot of time so there is other software which helps offload some of that complexity. One popular solution is Nicehash. A more complex solution is setting up multi-algorithm mining software. Sites like WhatToMine can help figure out what is the current best paying option.