Merkle trees are the reason a phone can check a blockchain transaction without storing the chain. They turn membership of a large set into a very short proof.
Hashing upward produces a single root
Each record in a set is hashed. Those hashes are paired and hashed again, and the pairing repeats until one value remains at the top.
That value is the root, and it depends on every record beneath it. Changing one byte anywhere changes the root.
The root is small and fixed in size regardless of whether the set holds ten items or ten million.
A proof is a path, not the dataset
To show an item belongs to the set, you supply the item and the sibling hash at each level between it and the root.
The verifier recomputes the hashes along that path. If the result matches the known root, the item was in the set, because producing that root any other way would require finding a hash collision.
The number of hashes needed grows with the depth of the tree rather than its width, so doubling the dataset adds one step. A set of a million records needs about twenty.
Light clients depend on this property
A block header contains a root committing to the transactions in that block, so a client that holds only headers can verify a transaction it cares about.
It requests the transaction and its path, recomputes, and compares against the root it already trusts. The rest of the block never has to be downloaded.
The server supplying the proof cannot lie about it either, since a fabricated path will not reproduce the root, and the client rejects it without needing to know anything else about the source.
The same structure appears throughout the stack
Airdrop contracts store one root and let each claimant supply a proof, which avoids writing thousands of addresses on chain.
State is committed the same way, so a contract can be shown the value of a storage slot on another chain without that chain's full state.
Rollups publish roots as commitments to their state, and withdrawal claims are checked against them.
What the proof does not establish
Inclusion is not validity. A proof shows a record was committed to under a given root; it says nothing about whether the record was legitimate.
The guarantee is also only as good as the root. A verifier that accepts a root from an untrusted source has moved the trust rather than removed it.