Hash Function
A one-way function that turns any data into a fixed-length fingerprint, where the same input always produces the same result.
A cryptographic hash is deterministic and fast to compute, but infeasible to run backwards and infeasible to find two different inputs that produce the same output, a property called collision resistance. Changing a single character of the input changes the output completely, which is what makes a hash useful as a tamper-evident summary of a large document or a block. Bitcoin uses SHA-256 and Ethereum uses Keccak-256, and both rely on hashes for linking blocks, building Merkle roots, deriving addresses, committing to data, and, in proof of work, for the guessing puzzle itself. Readers meet hashes as the long hexadecimal strings identifying transactions and blocks in any explorer.
In practice
A transaction hash is simply the hash of the transaction's contents, which is why it can be computed before broadcast and why any edit produces a different identifier.
The common misunderstanding
Hashing is not encryption; there is no key and nothing to decrypt, so hashed data can only be guessed at and checked, never recovered.