Keep in mind that not all cryptos are created equal and many have their own unique “mining” methodologies, however this explanation applies to the majority.
To put it simply, crypto mining is using computation power to solve complex puzzles.
Every transaction on a blockchain must be facilitated by a miner, who solves a very labor-intensive math problem to add the next block to the blockchain. Once a block is added to the blockchain ledger, it becomes public and permanent.
Why would a miner…mine?
In most cases, take Bitcoin for example, the lucky miner who successfully solves the math problem is awarded some Bitcoin. At the time of this writing, the reward for successfully mining a block is 6.25 Bitcoins. That’s pretty lucrative!
Before you start scouring the internet for some mining equipment, keep in mind that most blockchains re-adjust the difficulty it takes to mine a block based on the computation power being thrown at it. With as popular as Bitcoin is, it takes a ridiculously expensive amount of hardware to even have a chance at successfully mining a block – it’s why most people acquire their coins through simply purchasing them.
For more, Google “what is bitcoin mining”. Bitcoinmining.com gives a great thorough explanation.