Bitcoin as a currency is not printed and distributed in the same way government issues fiat currencies are, in fact the initial supply of Bitcoin has been mined, much like Gold has been. Once the BTC has been mined it can then be distributed, sent or sold via exchanges, creating the secondary market and giving it value. The majority of Bitcoin is now in circulation with just a small % of the total available supply remaining un-mined.
In it's most basic form, Bitcoin mining can be described as a computer processor, often a GPU graphics card, solving mathematical calculations in order to process transactions and maintain the integrity and security of the proof of work Bitcoin network. In return, a reward is provided in the form of Bitcoin, which increases the supply until it's fixed amount is reached.
Bitcoin is incredibly secure at this time, where the scale of the network ensures that transactions are legitimate via the Blockchain based distributed ledger. All participants in the Bitcoin network store verified transactions and new transactions can only be added when there is consensus from nodes that it is legitimate.
This PoW mining process and consensus algorithm prevent transactions from being manipulated, removed or added, meaning that Bitcoin as a currency is highly secure, without the need of a managing central authority. This is extremely attractive to many people globally who may not trust or have been ignored by traditional financial institutions.
This has lead to the term decentralisation.
Currently, based on (1) price per hash and (2) electrical efficiency the best Bitcoin miner options are:
Bitcoin mining is intentionally designed to be resource-intensive and difficult so that the number of blocks found each day by miners remains steady. Individual blocks must contain a proof of work to be considered valid. This proof of work is verified by other Bitcoin nodes each time they receive a block. Bitcoin uses the hashcash proof-of-work function.
The primary purpose of mining is to allow Bitcoin nodes to reach a secure, tamper-resistant consensus. Mining is also the mechanism used to introduce Bitcoins into the system: Miners are paid any transaction fees as well as a "subsidy" of newly created coins.
This both serves the purpose of disseminating new coins in a decentralized manner as well as motivating people to provide security for the system.
Bitcoin mining is so called because it resembles the mining of other commodities: it requires exertion and it slowly makes new currency available at a rate that resembles the rate at which commodities like gold are mined from the ground.
A proof of work is a piece of data which was difficult (costly, time-consuming) to produce so as to satisfy certain requirements. It must be trivial to check whether data satisfies said requirements.
Producing a proof of work can be a random process with low probability, so that a lot of trial and error is required on average before a valid proof of work is generated. Bitcoin uses the Hashcash proof of work.
Bitcoin mining a block is difficult because the SHA-256 hash of a block's header must be lower than or equal to the target in order for the block to be accepted by the network.
This problem can be simplified for explanation purposes: The hash of a block must start with a certain number of zeros. The probability of calculating a hash that starts with many zeros is very low, therefore many attempts must be made. In order to generate a new hash each round, a nonce is incremented. See Proof of work for more information.
The Bitcoin mining network difficulty is the measure of how difficult it is to find a new block compared to the easiest it can ever be. It is recalculated every 2016 blocks to a value such that the previous 2016 blocks would have been generated in exactly two weeks had everyone been mining at this difficulty. This will yield, on average, one block every ten minutes.
As more miners join, the rate of block creation will go up. As the rate of block generation goes up, the difficulty rises to compensate which will push the rate of block creation back down. Any blocks released by malicious miners that do not meet the required difficulty target will simply be rejected by everyone on the network and thus will be worthless.
When a block is discovered, the discoverer may award themselves a certain number of bitcoins, which is agreed-upon by everyone in the network. Currently this bounty is 25 bitcoins; this value will halve every 210,000 blocks. See Controlled Currency Supply.
Additionally, the miner is awarded the fees paid by users sending transactions. The fee is an incentive for the miner to include the transaction in their block. In the future, as the number of new bitcoins miners are allowed to create in each block dwindles, the fees will make up a much more important percentage of mining income.