The difficulty is a number that regulates how long it takes for miners to add new blocks of transactions to the blockchain. Because the target is such an unwieldy number with tons of digits, people generally use a simpler number to express the current target. This number is called the mining difficulty.  This difficulty value updates every 2 weeks to ensure that it takes 10 minutes (on average) to add a new block to the blockchain. The difficulty is so important because, it ensures that blocks of transactions are added to the blockchain at regular intervals, even as more miners join the network. If the difficulty remained the same, it would take less time between adding new blocks to the blockchain as new miners join the network. The difficulty adjusts every 2016 blocks. At this interval, each node takes the expected time for these 2016 blocks to be mined (2016 x 10 minutes), and divides it by the actual time it took. It can be calculated as follows:
At this point, the actual mining begins. In essence, each miner now tries to demonstrate to the rest of the network that his or her block of verified payments is the one true block, which will serve as the permanent record of those 2,000 or so transactions. Miners do this by, essentially, trying to be the first to guess their block’s numerical password. It’s analogous to trying to randomly guess someone’s computer password, except on a vastly larger scale. Carlson’s first mining computer, or “rig,” which he ran out of his basement north of Seattle, could make 12 billion “guesses” every second; today’s servers are more than a thousand times faster.
To lower the costs, bitcoin miners have set up in places like Iceland where geothermal energy is cheap and cooling Arctic air is free.[204] Bitcoin miners are known to use hydroelectric power in Tibet, Quebec, Washington (state), and Austria to reduce electricity costs.[203][205][206][207] Miners are attracted to suppliers such as Hydro Quebec that have energy surpluses.[208] According to a University of Cambridge study, much of bitcoin mining is done in China, where electricity is subsidized by the government.[209][210]

Mining is the process of adding transaction records to Bitcoin's public ledger of past transactions (and a "mining rig" is a colloquial metaphor for a single computer system that performs the necessary computations for "mining". This ledger of past transactions is called the block chain as it is a chain of blocks. The blockchain serves to confirm transactions to the rest of the network as having taken place. Bitcoin nodes use the blockchain to distinguish legitimate Bitcoin transactions from attempts to re-spend coins that have already been spent elsewhere.
“Cryptojacking scams have continued to evolve, and they don’t even need you to install anything,” Jason Adler, an assistant director for the Federal Trade Commission, wrote in a blog post in June. “Scammers can use malicious code embedded in a website or an ad to infect your device. Then they can help themselves to your device’s processor without you even knowing.”

Is Bitcoin a safe way to store value digitally? Are we wise to save our coins on our computer? It’s true that online wallets are necessarily more dangerous than offline wallets. However, even offline wallets can be breached, meaning that security in the Bitcoin world depends largely on following good practices. Just like you would avoid flailing your bills about in a dangerous place, you should make sure to keep your passwords and keys as safe as possible.
A Bitcoin wallet is also referred to as a digital Wallet. Establishing such a wallet is an important step in the process of obtaining Bitcoins. Just as Bitcoins are the digital equivalent of cash, a Bitcoin wallet is analogous to a physical wallet. But instead of storing Bitcoins literally, what is stored is a lot of relevant information like the secure private key used to access Bitcoin addresses and carry out transactions. The four main types of wallet are desktop, mobile, web and hardware.
Bitcoin Core is the “official” Bitcoin client and wallet, though isn’t used by many due to slow speeds and a lack of features. Bitcoin Core, however, is a full node, meaning it helps verify and transmit other Bitcoin transactions across the network and stores a copy of the entire blockchain. This offers better privacy since Core doesn’t have to rely on data from external servers or other peers on the network. Bitcoin Core routed through Tor is considered one of the best ways to use Bitcoin privately.
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.”

Majority consensus in bitcoin is represented by the longest chain, which required the greatest amount of effort to produce. If a majority of computing power is controlled by honest nodes, the honest chain will grow fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of that block and all blocks after it and then surpass the work of the honest nodes. The probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added.[3]
Computing power is often bundled together or "pooled" to reduce variance in miner income. Individual mining rigs often have to wait for long periods to confirm a block of transactions and receive payment. In a pool, all participating miners get paid every time a participating server solves a block. This payment depends on the amount of work an individual miner contributed to help find that block.[8]
Bitcoin is a peer-to-peer version of electronic cash that allows payments to be sent directly from one party to another without going through a financial institution. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. – Satoshi Nakamoto

During the last several years an incredible amount of Bitcoin mining power (hashrate) has come online making it harder for individuals to have enough hashrate to single-handedly solve a block and earn the payout reward. To compensate for this pool mining was introduced. Pooled mining is a mining approach where groups of individual miners contribute to the generation of a block, and then split the block reward according the contributed processing power.

The basin has become a proving ground for the broader debate about the future of blockchain technology. Critics insist that bitcoin will never work as a mainstream currency—it’s slow and far too volatile. Its real function, they say, is as a “store of value”—that is, an investment asset, like gold or company shares—except that, unlike these traditional assets, bitcoin has no real underlying economic value. Rather, critics say, it has become merely another highly speculative bet—much like mortgage-backed derivatives were in the prelude to the financial crisis—and like them, it is just as assured of an implosion.
Home Sweet Repair Shop: One building on the grounds houses a lunchroom, operational center, repair shop, and dormitory. A few dozen employees run the entire facility. Their jobs include scanning the racks for malfunctioning machines, cleaning the cooling fans, fixing broken rigs, and installing upgraded machines. Many of the employees are recent engineering graduates from the local university.
In the process of mining, each Bitcoin miner is competing with all the other miners on the network to be the first one to correctly assemble the outstanding transactions into a block by solving those specialized math puzzles. In exchange for validating the transactions and solving these problems. Miners also hold the strength and security of the Bitcoin network. This is very important for security because in order to attack the network, an attacker would need to have over half of the total computational power of the network. This attack is referred to as the 51% attack. The more decentralized the miners mining Bitcoin, the more difficult and expensive it becomes to perform this attack.
As more miners join, the rate of block creation increases. As the rate of block generation increases, the difficulty rises to compensate, which has a balancing of effect due to reducing the rate of block-creation. Any blocks released by malicious miners that do not meet the required difficulty target will simply be rejected by the other participants in the network.
In addition to being the means of generating new bitcoin, bitcoin mining creates the blockchain that verifies bitcoin transactions. The block reward is gleaned by placing a new block on the blockchain, which acts as an advancing public ledger of verified transaction. This is an essential function for bitcoin's operation as it enables the currency to be safely and predictably created without the centralized regulation in the form of a bank or federal government. Blocks must to be a validated by a proof-of-work (Bitcoin uses Hashcash), which can only be obtained by expending a great deal of processing power. Once a block is obtained a message is broadcast to the mining network and verified by all recipients. 
Bitcoin is a peer-to-peer version of electronic cash that allows payments to be sent directly from one party to another without going through a financial institution. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. – Satoshi Nakamoto
Bitcoins may not be ideal for money laundering, because all transactions are public.[50] Authorities, including the European Banking Authority[51] the FBI,[23] and the Financial Action Task Force of the G7[52] have expressed concerns that bitcoin may be used for money laundering. In early 2014, an operator of a U.S. bitcoin exchange, Charlie Shrem, was arrested for money laundering.[53] Subsequently, he was sentenced to two years in prison for "aiding and abetting an unlicensed money transmitting business".[43] Alexander Vinnik, an alleged owner of BTC-e was arrested in Greece July 25 of 2017 on $4 bln money laundering charges for flouting anti-money laundering (AML) laws of the US. A report by UK's Treasury and Home Office named "UK national risk assessment of money laundering and terrorist financing" (2015 October) found that, of the twelve methods examined in the report, bitcoin carries the lowest risk of being used for money laundering, with the most common money laundering method being the banks.[54]
Bitcoin prices were negatively affected by several hacks or thefts from cryptocurrency exchanges, including thefts from Coincheck in January 2018, Coinrail and Bithumb in June, and Bancor in July. For the first six months of 2018, $761 million worth of cryptocurrencies was reported stolen from exchanges.[60] Bitcoin's price was affected even though other cryptocurrencies were stolen at Coinrail and Bancor, as investors worried about the security of cryptocurrency exchanges.[61][62][63]