A Hashed Timelock Contract (HTLC) is a type of smart contract that uses cryptographic hash locks and time limits to ensure that a payment is either completed within a specified timeframe or automatically refunded. HTLCs are a fundamental building block of the Lightning Network and enable trustless atomic swaps between different blockchains. They work by requiring the recipient to provide a cryptographic proof of payment before a deadline, or the funds return to the sender.