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]
Network nodes can validate transactions, add them to their copy of the ledger, and then broadcast these ledger additions to other nodes. To achieve independent verification of the chain of ownership each network node stores its own copy of the blockchain.[65] About every 10 minutes, a new group of accepted transactions, called a block, is created, added to the blockchain, and quickly published to all nodes, without requiring central oversight. This allows bitcoin software to determine when a particular bitcoin was spent, which is needed to prevent double-spending. A conventional ledger records the transfers of actual bills or promissory notes that exist apart from it, but the blockchain is the only place that bitcoins can be said to exist in the form of unspent outputs of transactions.[3]:ch. 5
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]

This bizarre process might not seem like it would need that much electricity—and in the early years, it didn’t. When he first started in 2012, Carlson was mining bitcoin on his gaming computer, and even when he built his first real dedicated mining rig, that machine used maybe 1,200 watts—about as much as a hairdryer or a microwave oven. Even with Seattle’s electricity prices, Carlson was spending around $2 per bitcoin, which was then selling for around $12. In fact, Carlson was making such a nice profit that he began to dream about running a bunch of servers and making some serious money. He wasn’t alone. Across the expanding bitcoin universe, lots of miners were thinking about scaling up, turning their basements and spare bedrooms into jury-rigged data centers. But most of these people were thinking small, like maybe 10 kilowatts, about what four normal households might use. Carlson’s idea was to leapfrog the basement phase and go right to a commercial-scale bitcoin mine that was huge: 1,000 kilowatts. “I started to have this dream, that I was posting on online forums, ‘I think I could build the first megawatt-scale mine.’”
The use of bitcoin by criminals has attracted the attention of financial regulators, legislative bodies, law enforcement, and the media.[220] In the United States, the FBI prepared an intelligence assessment,[221] the SEC issued a pointed warning about investment schemes using virtual currencies,[220] and the U.S. Senate held a hearing on virtual currencies in November 2013.[222] The U.S. government claimed that bitcoin was used to facilitate payments related to Russian interference in the 2016 United States elections.[223]

Hardware wallets are by far the most secure kind of Bitcoin wallet, as they store Bitcoins on a physical piece of equipment, generally plugged into a computer via a USB port. They are all but immune to virus attacks and very few instances of Bitcoin theft have been reported. These devices are the only Bitcoin wallets which aren't free, and they often cost $100 to $200. 

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]

What separated these survivors from the quitters and the double-downers, Carlson concluded, was simply the price of electricity. Survivors either lived in or had moved to places like China or Iceland or Venezuela, where electricity was cheap enough for bitcoin to be profitable. Carlson knew that if he could find a place where the power wasn’t just cheap, but really cheap, he’d be able to mine bitcoin both profitably and on an industrial scale.

Bitcoin is a type of cryptocurrency: Balances are kept using public and private "keys," which are long strings of numbers and letters linked through the mathematical encryption algorithm that was used to create them. The public key (comparable to a bank account number) serves as the address which is published to the world and to which others may send bitcoins. The private key (comparable to an ATM PIN) is meant to be a guarded secret, and only used to authorize Bitcoin transmissions.
David Carlson: The Bitcoin Pioneer | Carlson, a former software engineer, is often credited with starting the basin’s bitcoin boom when he built one of the world’s first large-scale mines in an old furniture store in Wenatchee. “We’re where the blockchain goes from that virtual concept to something that’s real in the world, something that somebody had to build and is actually running,” he says. Here, Carlson stands in front of his latest mining endeavor, a megaproject made up of 24 prefabricated mining “pods.” | Patrick Cavan Brown for Politico Magazine
Step 3) Once your client has fully updated, you’ll need to click “New” in the Bitcoin client to get a new Bitcoin wallet. Your wallet is just a long alphanumeric sequence. Make sure you keep a copy of your wallet.dat file on a thumb drive. Print a copy out and keep it in a safe location. Put a copy in cloud storage. You do this because if your computer crashes, then you’ll lose all your Bitcoins if you can’t access the wallet.dat file.
The process of mining bitcoins works like a lottery. Bitcoin miners are competing to produce hashes—alphanumeric strings of a fixed length that are calculated from data of an arbitrary length. They’re producing the hashes from a combination of three pieces of data: new blocks of Bitcoin transactions; the last block on the blockchain; and a random number. These are collectively referred to as the “block header” for the current block. Each time miners perform the hash function on the block header with a new random number, they get a new result. To win the lottery, a miner must find a hash that begins with a certain number of zeroes. Just how many zeroes are required is a shifting parameter determined by how much computing power is attached to the Bitcoin network. Every two weeks, on average, the mining software automatically readjusts the number of leading zeros needed—the difficulty level—by looking at how fast new blocks of Bitcoin transactions were added. The algorithm is aiming for a latency of 10 minutes between blocks. When miners boost the computing power on the network, they temporarily increase the rate of block creation. The network senses the change and then ratchets up the difficulty level. When a miner’s computer finds a winning hash, it broadcasts the block header to its next peers in the Bitcoin network, which check it and then propagate it further.
That’s why mining pools came into existence. The idea is simple: miners group together to form a “pool” (i.e., combine their mining power to compete more effectively). Once the pool manages to win the competition, the reward is spread out between the pool members depending on how much mining power each of them contributed. This way, even small miners can join the mining game and have a chance of earning Bitcoin (though they get only a part of the reward).
The Mid-Columbia Basin isn’t the only location where the virtual realm of cryptocurrency is colliding with the real world of megawatts and real estate. In places like China, Venezuela and Iceland, cheap land and even cheaper electricity have resulted in bustling mining hubs. But the basin, by dint of its early start, has emerged as one of the biggest boomtowns. By the end of 2018, according to some estimates, miners here could account for anywhere from 15 to 30 percent of all bitcoin mining in the world, and impressive shares of other cryptocurrencies, such as Ethereum and Litecoin. And as with any boomtown, that success has created tensions. There have been disputes between miners and locals, bankruptcies and bribery attempts, lawsuits, even a kind of intensifying guerrilla warfare between local utility crews and a shadowy army of bootleg miners who set up their servers in basements and garages and max out the local electrical grids.
Miehe still runs his original mine, a half-megawatt operation not far from the carwash. But his main job these days is managing hosting sites for other miners and connecting outsiders with insiders—and he’s OK with that. He sold off some of his bitcoin stack, just after Christmas. He’s still bullish on crypto, and on the basin’s long-term prospects. But he no longer has any appetite for the race for scale. Gone are the glory days when commercial miners could self-finance with their own stacks. Today, you need outside financing—debt—which, for Miehe, who now has two young children, would mean an unacceptable level of stress. “I’ve already done it,” he says. “My entire data center was built with bitcoin, from nothing. I’ve already won enough for what I was looking for out of mining.” He pauses. “The risk and reward is getting pretty great,” he says. “And I’m not sure I want to be on the front line of that battle.”

You can look at this hash as a really long number. (It's a hexadecimal number, meaning the letters A-F are the digits 10-15.) To ensure that blocks are found roughly every ten minutes, there is what's called a difficulty target. To create a valid block your miner has to find a hash that is below the difficulty target. So if for example the difficulty target is

Bitcoin (BTC) is a cryptocurrency which is regarded as the world’s first decentralized digital currency. It was created by a pseudonymous person or persons named Satoshi Nakamoto in 2009 and has since gone on to become the world’s most popular cryptocurrency by market cap. Bitcoin is a deflationary currency whose issuance is capped at a total supply of 21 million coins. Each Bitcoin can be divided into one million units, with the smallest unit of 0.00000001 known as a satoshi in homage to its creator. The distributed public ledger that Bitcoin uses to record transactions is known as a blockchain and Bitcoin can be spent at over 100,000 online merchants and can also be held as an investment. Bitcoin is traded for fiat and other cryptocurrencies on various exchanges but can also be used to facilitate p2p transactions. Each transaction incurs a small transaction fee to cover the cost of sending Bitcoin over the blockchain ledger, with the fee going to miners tasked with keeping the network secure.
How hard are the puzzles involved in mining? Well, that depends on how much effort is being put into mining across the network. The difficulty of the mining can be adjusted, and is adjusted by the protocol every 2016 blocks, or roughly every 2 weeks. The difficulty adjusts itself with the aim of keeping the rate of block discovery constant. Thus if more computational power is employed in mining, then the difficulty will adjust upwards to make mining harder.  And if computational power is taken off of the network, the opposite happens. The difficulty adjusts downward to make mining easier.

In a Ponzi scheme using bitcoins, the Bitcoin Savings and Trust promised investors up to 7% weekly interest, and raised at least 700,000 bitcoins from 2011 to 2012.[55] In July 2013, the U.S. Securities and Exchange Commission charged the company and its founder in 2013 "with defrauding investors in a Ponzi scheme involving bitcoin".[55] In September 2014 the judge fined Bitcoin Savings & Trust and its owner $40 million.[56]

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]