Bitcoins are created as rewards granted to miners for solving blocks in the Bitcoin blockchain, thereby ensuring its security. When Bitcoin was created, it was written into its protocol that the supply of Bitcoin would be restricted to 21 million. Every 210,000 blocks that get mined, the rewards are halved. This means that the last Bitcoin won’t be mined until roughly 2140.
At this point, there will never be any more Bitcoin issued into circulation, unless the Bitcoin software is changed, which is highly unlikely. When the last Bitcoin is mined, miners will no longer be awarded new Bitcoin for verifying and securing transactions.
Although miners are no longer needed to create Bitcoins, they are still needed to verify transactions. Miners will continue to receive transaction fees, which is the small fee you pay for sending Bitcoin.
The transaction fees alone are currently significantly smaller than the rewards for solving a block, and would certainly not be enough to make mining profitable. However, over time these fees are likely to increase and eventually become valuable enough to encourage miners to keep mining.
It is also likely that mining technology will improve, eventually becoming so small and cheap that they can be installed on many electronic devices.