The 17 millionth Bitcoin is due to be mined today, leaving only 4 million left in the total supply of 21 million. Bitcoin was designed to mimic the properties of natural resources like gold. The scarcity is deliberate, and designed to maintain and increase the value of the currency.
In fact, the rate of mining is slowing all the time - while at the moment, approximately 1800 coins are mined per day with a new block added every ten minutes, the design causes this rate to half every 4 years, thus creating the supply curve seen below.
How is Bitcoin created?
Bitcoin is "mined" by people running powerful computers called mining nodes. Nodes store the blockchain data and mining nodes verify transactions and keep the Bitcoin network operational. The process is called 'proof-of-work' and it is this expensive 'mining' that truly gives bitcoin its economic value.
Transactions are gathered into "blocks" and added to the blockchain in exchange for rewards - to create a block of data, the miners use computing power to guess the correct answer to cryptographic algorithms, which is also a deliberate feature aimed to distribute power evenly and prevent groups from dominating the network, by making it difficult and expensive to mine.
Currently miners are rewarded 12.5 BTC per block compared to 25 BTC two years ago and 50 BTC in the beginning - the rewards and rates decrease proportionately over time, ideally to match the increase in value so as not to give miners too much wealth at once.
The curency is deflationary, meaning that the scarcity generally contributed to the price increasing. Here's a chart made by r/bitcoin mod BashCo portraying the supply vs the inflation.
It's estimated that the last Bitcoin willl be mined in 120 years (2140), but this won't spell the end of the currency - much as we've seen happen already, the only likely outcome is that the price will increase even further due to the supply turning deflationiary as users lose private keys by accident.