Mining is used to verify events in the blockchain.
This is understood to be a mathematical process at the end of which the blockchain is extended by another block where all participants in the blockchain (the so-called "miners") work together. The information to be stored is thus verified and documented. Because this computational process requires a lot of computing power from the miners, they receive coins as a reward for their efforts.