Previous posters have done a good job to answer your question.
Just wanted to add that some people are looking replacing this 'Proof-of-Work/Mining' mechanism with a different method called 'Proof-of-Stake [0]. Other cryptocurrencies have already implemented this.
If you jump into the blockchain/bitcoin rabbit hole you will eventually come across this :)
There is another model called DPoS (D=delegated) where you use your coins to vote for block producers, who then use their keys to sign blocks. It's pretty cool, because then the miners' (in DPoS known as "witnesses") keys need not directly control any coins (just sign blocks with the transactions of others).
Just wanted to add that some people are looking replacing this 'Proof-of-Work/Mining' mechanism with a different method called 'Proof-of-Stake [0]. Other cryptocurrencies have already implemented this.
If you jump into the blockchain/bitcoin rabbit hole you will eventually come across this :)
[0] https://en.bitcoin.it/wiki/Proof_of_Stake