Mining is how the bitcoin network is able to validate and send transactions from person to person while remaining secure without the need of a dedicated third party. Mining involves the use of computer power working on a program to add transaction data to the global ledger or blockchain, once the block is filled with the required amount of transactions it is shaped into a mathematical problem. The miner will then go on to solve the problem and the block and the solution will be broadcast to the network for the other miners to “confirm” whether it is correct and should be added to the permanent ledger (blockchain). The miner will be rewarded with the currency with a fee for the transaction, and the block reward which is reduced periodically to control the inflation of the currency.
This is determined by the difficulty of the equations and amount of problem solving power. In the case of Bitcoin the difficulty is retargeted every 2016 blocks (approx. 2 weeks) to achieve a halving of the reward approximately every 4 years. the reward started at 50 bitcoins per block. (the transaction fee is deducted from the users bitcoin currently in circulation that is being sent) Because of the difficulty increasing over time this leads to more computing power required and in turn larger overheads.
A cheaper and popular alternative to this is cloud mining the rewards are smaller but so are the cost as “pools” of miners typically use a remote datacentera such as Genesis-Mining