A smart contract is a digital agreement between 2 or more parties. Smart contracts are governed by code, as opposed to traditional contracts that are governed by people.
A smart contract will run (like a program) only when specific conditions are met. Basic smart contracts run like if this then that. More advanced smart contracts can now incorporate oracles that unlock more data sources like payments, weather data, derivatives, automated market makers, trading bots, marketplaces, etc.