An on-chain transaction is any transfer or action that is recorded directly on a blockchain's ledger, and the wider idea of activity that happens on the chain is covered under on-chain. "On-chain transaction" names the individual record, such as a single payment of bitcoin or a stablecoin transfer, while "on-chain" describes the setting in which it takes place.
An on-chain transaction is created when a wallet signs an instruction with the holder's private key and broadcasts it to the network. It waits in the mempool until a miner or validator includes it in a block, at which point it receives a transaction hash that anyone can look up on a blockchain explorer. The sender pays a network fee, and the transaction becomes harder to reverse with each additional block confirmation.
On-chain transactions are contrasted with off-chain ones, such as transfers between users inside an exchange or payments through channels, which do not create a record on the main ledger until positions are settled. Whether a transfer is on-chain or off-chain affects its cost, speed, privacy and the evidence available for compliance checks.