A smart contract is like a digital agreement that automatically enforces itself when certain conditions are met.
For example, imagine you and a friend are betting on the outcome of a sports game. You both agree to put some money into a smart contract that will automatically pay out to the winner based on the outcome of the game.
When the game ends, the smart contract checks the outcome and automatically sends the money to the winner. This happens without the need for a middleman, such as a betting site or a bank, to oversee the transaction.