A hashlock is a condition in a blockchain transaction or smart contract that keeps funds locked until someone reveals a secret value, called the preimage, whose hash equals a value written into the condition. Anyone can check the claim by running the same hash function over the revealed secret, but nobody can work backwards from the hash to find it. The term "hashlock key" is sometimes used for that secret.
On its own a hashlock is rarely used. It is usually combined with a timelock in a hashed timelock contract (HTLC): the recipient can claim the funds by revealing the secret before a deadline, and otherwise the sender gets them back. Because the same secret can open locks on two chains, the construction allows trustless atomic swaps, and it lets the Lightning Network route a payment through several channels so that each hop is settled only when the final recipient reveals the secret.
Ref 1070001191