What is Mining
In order for the Ethereum platform to work, it needs Ether. This is a cryptocurrency, or virtual currency, (commonly referred to as a token) that allows Dapps, Smart Contracts, and other activity that occurs on the blockchain to work.
However, Ether does not magically appear. Similar to the Old West currency of gold and silver, Ether has to be mined
Ether, like gold, can be "mined"
The process of mining is done through a network of multiple computers around the globe communicating with one another to solve a puzzle. This “puzzle” is a random combination of mathematical equations, and whichever computer [miner] correctly solves the equation the quickest, gets rewarded with Ether.
In addition to creating new Ether, mining is also used to secure the network from foul play. While miners are racing to solve these puzzles, they’re also verifying any work done on the blockchain as it occurs. This is done to prevent any retractions or double-spending. Double-spending is similar to someone trying to use the same exact cashier’s check at two different locations to pay for something.
Mining offers incentive to miners to help power the Ethereum network and keep it secure.
When a miner is awarded Ether, it’s used to incentivize healthy code since producing wasteful code is costly to miners. The mining process allows the blockchain to continue to run smoothly.