Mining is the process of solving mathematical problems to validate blocks of operations in the blockchain and the blockchain is the accounting book that keeps record of all those operations.
The advantage of using mining is that supply and demand is self-regulating, that is, higher demand for bitcoins (suppose we talk about bitcoins), the greater the demand for mining, the factor or complexity of the equation grows, being more difficult to solve it to release new blocks.
Greater complexity implies a greater need for computational equipment to solve it, firing the fees of the miners and making it more difficult to mine the bitcoins owners will not want to move their BTC because it will be expensive to move them, until the demand drops which would level again the prices of mining.
It is what is happening, thanks to the hard forks bitcoin did not explode as many speculators have made bitcoin remain at a more or less stable level.
What would happen when there are no bitcoins to be mined?, what will happen is that there will be no terrestrial technology that can solve this super huge algorithm to discover blocks, being stuck in very high fees of mining.
That is why the experts meet every year in the #Consensus2018 to assess the future of all these issues and how to achieve future growth without creating chaos.