Various potential attacks on the bitcoin network and its use as a payment system, real or theoretical, have been considered. The bitcoin protocol includes several features that protect it against some of those attacks, such as unauthorized spending, double spending, forging bitcoins, and tampering with the blockchain. Other attacks, such as theft of private keys, require due care by users.[13][14][15][16][17][18][19]
In exchange for securing the network, and as the “lottery price” that serves as an incentive for burning this energy, each new block includes a special transaction. It’s this transaction that awards the miner with new bitcoins, which is how bitcoins first come into circulation. At Bitcoin’s launch, each new block awarded the miner with 50 bitcoins, and this amount halves every four years: Currently each block includes 12.5 new bitcoins. Additionally, miners get to keep any mining fees that were attached to the transactions they included in their blocks.
While senders of traditional electronic payments are usually identified (for verification purposes, and to comply with anti-money laundering and other legislation), users of bitcoin in theory operate in semi-anonymity. Since there is no central "validator," users do not need to identify themselves when sending bitcoin to another user. When a transaction request is submitted, the protocol checks all previous transactions to confirm that the sender has the necessary bitcoin as well as the authority to send them. The system does not need to know his or her identity.
Keeping your Bitcoin wallet safe is essential as Bitcoin wallets represent high-value targets for hackers. Some safeguards include: encrypting the wallet with a strong password, and choosing the cold storage option i.e. storing it offline. It's also advisable to frequently back up your desktop and mobile wallets, as problems with the wallet software on your computer or mobile device could erase your holdings. 
The software delivers the work to the miners and receives the completed work from the miners and relays that information back to the blockchain. The best Bitcoin mining software can run on almost any desktop operating systems, such as OSX, Windows, Linux, and has even been ported to work on a Raspberry Pi with some modifications for drivers depending on the platform.
Bitcoin solves the "double spending problem" of electronic currencies (in which digital assets can easily be copied and re-used) through an ingenious combination of cryptography and economic incentives. In electronic fiat currencies, this function is fulfilled by banks, which gives them control over the traditional system. With bitcoin, the integrity of the transactions is maintained by a distributed and open network, owned by no-one.
Difficulty increase per year: This is probably the most important and elusive variable of them all. The idea is that since no one can actually predict the rate of miners joining the network, neither can anyone predict how difficult it will be to mine in six weeks, six months, or six years from now. In fact, in all the time Bitcoin has existed, its profitability has dropped only a handful of times—even at times when the price was relatively low.

Somewhere around 2017, the concept of web mining came to life. Simply put, web mining allows website owners to “hijack,” so to speak, their visitors’ CPUs and use them to mine Bitcoin. This means that a website owner can make use of thousands of “innocent” CPUs in order to gain profits. However, since mining Bitcoins isn’t really profitable with a CPU, most of the sites that utilize web mining mine Monero instead. Up until today, over 20,000 sites have been known to utilize web mining.
Nor was it simply the deep pockets. At these prices, even smaller operators have been able to make real money running a few machines in home-based, under-the-radar mines. Take the 20-something Wenatchee man we’ll call “Benny”—he didn’t want to be identified—who last July bought three mining servers, set them up in his house (one in the master bedroom and two in the living room)—and began mining Ethereum, bitcoin’s closest cryptocurrency rival. As Ethereum climbed from $165 in July to nearly $1,200 in January, Benny had not only repaid his $7,000 investment but was making enough to pay his mortgage. As a side benefit, this winter, Benny’s power bill went down: The waste heat from the three churning servers kept the house at a toasty 78 degrees. “We actually have to open the windows,” he told me in January. His servers, meanwhile, pretty much run themselves—although, when he’s at work, clerking at a grocery, he monitors the machines, and the Ethereum price, on his phone. “It’s just basically free money,” Benny says. “All I have to do is wake up in the morning and make sure nothing crashed during the night.”

A hard fork of a cryptocurrency is a change to the protocol that makes previously invalid blocks/transactions valid (or vice-versa). This requires all the nodes to upgrade to the latest version of the protocol software. In other words, a hard fork is a permanent divergence from the previous version of the blockchain, and nodes running previous versions will no longer be accepted by the newest version. This, in turn, creates a fork in the blockchain: one path follows the new, upgraded blockchain, and the other path continues along the old path.
The amount of new bitcoin released with each mined block is called the block reward. The block reward is halved every 210,000 blocks, or roughly every 4 years. The block reward started at 50 in 2009, is now 12.5 in 2018, and will continue to decrease. This diminishing block reward will result in a total release of bitcoin that approaches 21 million.  
Bitcoin mining is competitive and the goal is that you want to solve or “find” a block before anyone else’s miner does. Then you will get the block reward and transaction fees from the block. During the last several years we have seen an incredible amount of hashrate coming online which made it harder to have enough hashrate personally (individually) to solve a block, thus getting the payout reward. To compensate for this pool mining was developed.
Bitcoin was the first decentralized digital currency; an online peer-to-peer payment system, without the need for third-party intermediaries such as banks. It was first released in 2008 and has since grown to be the largest cryptocurrency when measured by market cap. Bitcoins are not issued like traditional currency, they are digital and “mined” by powerful servers over time. It was designed to have a fixed supply of 21 million coins.
Nakamoto is estimated to have mined one million bitcoins[26] before disappearing in 2010, when he handed the network alert key and control of the code repository over to Gavin Andresen. Andresen later became lead developer at the Bitcoin Foundation.[27][28] Andresen then sought to decentralize control. This left opportunity for controversy to develop over the future development path of bitcoin.[29][28]