Miners are the ones who validate new transactions and record them on to a global ledger called Blockchain. On an average for every 10 minutes, a block is mined, a block is a structure which contains transactions. Principally speaking everybody can be a miner.
As the cryptocurrency network is decentralized one and has no delegated authority on the tasks performed. It needs a kind of mechanism which prevents only one party ruling it and also protects the transactions from being forged by the thousands of peers who create these transactions. Due to which there are high chances of the network to be broken.
To avoid this Satoshi has set few rules for the miners to invest some amount of work from their computers and qualify for the task. The task involved in finding a hash, which is a product of the cryptographic function. The hash helps to connect a new block with its predecessor. This whole process is called as the Proof of Work.
The hash algorithm in Bitcoin is based on SHA 256 algorithm. Understanding the details of SHA 256 algorithm is not important. But the basis of cryptologic puzzle where the miners compete to solve is important. After finding the solution the Miner builds a block and adds it to the blockchain.
As a token of appreciation, the miner gets the right to add a coinbase transaction and earn incentives with a specific number of Bitcoins.
This way, valid bitcoins are created by the miners on solving the cryptographic puzzles. As the difficulty of the puzzle increases the amount a miner invests to solve it in a given period of time to get the specific amount of cryptocurrency token gets tougher. By this consensus, no peer in the process can break the network.