Blockchain is the technology that bolsters cryptocurrencies. In 2008, Satoshi Nakamoto created Bitcoin using Blockchain technology, making it extremely hard to change or cheat the system. This is due to the information is not centrally stored in one location. Instead, it is spread across a network of peer-to-peer computers, and the data is stored in blocks.
The blocks hold information of the sender, the receiver, and the number of coins owned. In addition, it will include a hash of the current block and the previous block.
A hash is a unique digital signature that can be compared to a fingerprint. If the contents of a block change, the hash will change too. This helps detect any changes or fraudulent activities to a block.
When a new block is added, this information is sent to all nodes on the network. The nodes validate information based on the hash and either accept or reject a block. If blocks are tampered with, the nodes on the network will reject the block.
To tamper with a block will mean you will need to tamper with all the blocks on the chain, redo all the proof of work for each block, and take control of the peer-to-peer network.
Most blockchains can now attach a smart contract to their blocks. However, once the contract is created, it can never be changed, and the output in the contract will need to be validated by everyone on the network, making it extremely hard to hack.