Blockchain: Chained blocks and Merkle trees
In short: A blockchain is a list of data blocks that are cryptographically chained so that later changes are noticeable; it is kept jointly by many participants.
In more detail: The idea: a shared register that nobody controls alone and that still cannot be changed unnoticed. The best-known example is Bitcoin, but the technology can also be used outside cryptocurrencies. It is not sensible for every problem, though.
In Depth
Structure
Each block contains several transactions, a timestamp and the hash of the previous block:
Block 1: [data] hash=A1…
Block 2: [data] previous=A1… hash=B7…
Block 3: [data] previous=B7… hash=C2…
If an old block is changed, its hash changes, and all following links no longer match. Whoever wants to forge would have to recompute all later blocks.
Merkle tree
Within a block the transactions are hashed in pairs, the hashes again in pairs, until a single root hash (Merkle root) remains. It is stored in the block. This lets you prove with only log n hashes that a transaction is contained in the block (Merkle proof) without loading the whole block.
Consensus: who may append the next block?
Many computers (nodes) hold a copy. For them to agree, a consensus mechanism is needed: proof of work (Bitcoin: computational effort, high energy consumption), proof of stake (Ethereum: stake of capital, much less energy) or others. In case of conflicts the longest (or heaviest) chain usually applies. With a growing number of following blocks, a transaction becomes ever more final.
Benefits and limits
Advantages: tamper resistance, traceability, no central operator. Disadvantages: slow, expensive, hard to change; public chains make data visible (privacy: the GDPR’s erasure rights fit poorly with immutable data). Often an ordinary database with signatures and an audit log is enough. A blockchain pays off when several parties who do not trust each other need a shared register.
See also: Cryptocurrencies, Bitcoin, Hashing, Crypto mining