Smart contract
A smart contract is a program on a blockchain that carries out the terms written in its code by itself. You trigger it with a transaction, and every node in the network gets the same result. Running it costs a fee (gas).
DeFi services and NFTs run on smart contracts. You cannot talk the code into a fix, so a bug in it can cost real money.
Example
You swap one token for another on a decentralized exchange. You sign a transaction, and the contract hands you the other token on its own if the swap conditions are met.
What not to do
Do not grant approvals on unknown sites. Otherwise the contract may be able to spend your tokens.