A smart contract is a set of code on the blockchain that automatically executes an agreement between parties without needing a middleman; for example, automatically transferring funds once a specific condition is met.
Most DeFi and NFT projects are built on smart contracts; for this reason, checking the security and getting an audit of these contracts before use matters a great deal.