First point: The validation of transactions
In fact, everything has already been said: mining is based on the validation of transactions. But what else? Digital currencies like Bitcoin are not managed by banks. That's why, to be valid, all transactions between users must be checked one by one, and validated.
Let's go back to the basics, and look at the term "cryptocurrency".
How to verify cryptocurrency transactions?
Each cryptocurrency (Bitcoin, Litecoin, Ethereum, etc.) has its own algorithm. It is a kind of small manual, describing precisely its characteristics. It is a sort of digital passport.
In the traditional banking system, what happens when you want to send money from your traditional bank account to someone else? It's very simple: the bank first checks your identity, verifies that you have the necessary funds, the necessary authorizations (you probably know that you are not free to send money wherever you want), etc. It's exactly the same principle with cryptocurrencies. Except that there is no bank to do this verification work!
So, in order to ensure impartial computer control, if you want to send a bitcoin to someone, the transaction will first be sent for verification to a neutral computer that has specific software. If everything is correct, the transaction is completed. If not, the transaction is rejected.
The principle of cryptocurrency mining
As you may have already realized, these computers are nothing more or less than computers. These are the computers that we buy in order to mine. But when do these computers make you money?
Just as a bank gets paid on the transactions you make, each computer owner who has made his or her computing power available to validate a transaction receives a small percentage of the transaction.
And there you have it, you've just understood what mining is all about: using a super-powerful computer to validate as many transactions as possible, in order to get a maximum of commissions!