A smart contract is a computer code-based agreement between two individuals. They are stored on a public ledger and cannot be modified because they run on the blockchain. A smart contract's transactions are handled by the blockchain, which means they can be submitted automatically without the involvement of a third party.
The Smart contracts are secure, transparent, third-party-free, autonomous, and accurate.
Let me use an example to demonstrate how smart contracts work. If Alex decides to sell his home to Bob. Then they would pay a slew of fees to third parties such as real estate agents, banks, attorneys, and others. However, with a smart contract, they can simply write a statement stating that if Bob pays this amount of money, he will be given ownership of the property. Hence, smart contracts can cut down the actual process and give us trustable options for transactions.