Smart contracts are automated workflows written on top of the blockchain ledger that can read and write to the blockchain ledger and update the state of the blockchain system. What makes them special is that once they are deployed, they cannot be modified or controlled by external accounts (human-controlled accounts). They will always behave in accordance with the code written into them. This makes them perfect for creating time- or condition-based escrows that can operate without the involvement of a middleman.
Let's take an example. Alice wants to buy a car from Bob, but she will pay Bob the money and take possession of the car only if Bob gets a no objection certificate (NOC) issued for harmful emissions. Bob, on the other hand, doesn't want to spend more money on repairing his old car because he is worried...