The validity of each cryptocurrency's coins is provided by a blockchain. A blockchain is a continuously growing list of records, called blocks, which are linked and secured using cryptography.[23][26] Each block typically contains a hash pointer as a link to a previous block,[26] a timestamp and transaction data.[27] By design, blockchains are inherently resistant to modification of the data. It is "an open, distributed ledger that can record transactions between two parties efficiently and in a verifiable and permanent way".[28] For use as a distributed ledger, a blockchain is typically managed by a peer-to-peer network collectively adhering to a protocol for validating new blocks. Once recorded, the data in any given block cannot be altered retroactively without the alteration of all subsequent blocks, which requires collusion of the network majority.

You don‘t need to understand the details about SHA 256. It‘s only important you know that it can be the basis of a cryptologic puzzle the miners compete to solve. After finding a solution, a miner can build a block and add it to the blockchain. As an incentive, he has the right to add a so-called coinbase transaction that gives him a specific number of Bitcoins. This is the only way to create valid Bitcoins.
Transactions are defined using a Forth-like scripting language.[7]:ch. 5 Transactions consist of one or more inputs and one or more outputs. When a user sends bitcoins, the user designates each address and the amount of bitcoin being sent to that address in an output. To prevent double spending, each input must refer to a previous unspent output in the blockchain.[81] The use of multiple inputs corresponds to the use of multiple coins in a cash transaction. Since transactions can have multiple outputs, users can send bitcoins to multiple recipients in one transaction. As in a cash transaction, the sum of inputs (coins used to pay) can exceed the intended sum of payments. In such a case, an additional output is used, returning the change back to the payer.[81] Any input satoshis not accounted for in the transaction outputs become the transaction fee.[81]
Bitcoin has been criticized for the amount of electricity consumed by mining. As of 2015, The Economist estimated that even if all miners used modern facilities, the combined electricity consumption would be 166.7 megawatts (1.46 terawatt-hours per year).[142] At the end of 2017, the global bitcoin mining activity was estimated to consume between one and four gigawatts of electricity.[211] According to Politico, even the high-end estimates of bitcoin's total consumption levels amount to only about 6% of the total power consumed by the global banking sector, and even if bitcoin's consumption levels increased 100 fold from today's levels, bitcoin's consumption would still only amount to about 2% of global power consumption.[212]
Because of bitcoin's decentralized nature and its trading on online exchanges located in many countries, regulation of bitcoin has been difficult. However, the use of bitcoin can be criminalized, and shutting down exchanges and the peer-to-peer economy in a given country would constitute a de facto ban.[176] The legal status of bitcoin varies substantially from country to country and is still undefined or changing in many of them. Regulations and bans that apply to bitcoin probably extend to similar cryptocurrency systems.[177]
Izabella Kaminska, the editor of FT Alphaville, has pointed out that criminals are using Ethereum to run Ponzi schemes and other forms of investment fraud.[68] The article was based on a paper from the University of Cagliari, which placed the number of Ethereum smart contracts which facilitate Ponzi schemes at nearly 10% of 1384 smart contracts examined. However, it also estimated that only 0.05% of the transactions on the network were related to such contracts.[69]
China banned trading in bitcoin, with first steps taken in September 2017, and a complete ban that started on 1 February 2018. Bitcoin prices then fell from $9,052 to $6,914 on 5 February 2018.[40] The percentage of bitcoin trading in the Chinese renminbi fell from over 90% in September 2017 to less than 1% in June 2018.[64] On August 1, 2017 a fork of the network created Bitcoin Cash.