An atomic swap is a smart contract technology that enables the exchange of one cryptocurrency for another without the need for a trusted third party. Atomic swaps use a mechanism called hashed timelock contracts (HTLC) to ensure that both parties either complete the exchange or the transaction is reversed, providing security and trustless trading.