A set of programmable instructions that executes when conditions are met to complete payment. Essentially two or more parties agree on certain terms for a transaction, code is created based on those conditions, money (crypto) is placed in escrow and then released based on the programmed terms.
This can be as simple as one payment released after a buyer says item arrived in good condition or as complex as the coding allows. Time based payments, transfer of properties, future conditions and many other things can be coded. Almost limitless.
Smart Contract is the real contract that is a small computer code that is written in inside the blockchain technology. ERC20 is an Ethereum smart contract that is used as a security token in exchange trading platforms. Ethereum smart contract development replaces the escrow services. also, By avoiding third-party intermediaries wherever the escrow services used. For more information you can refer this guide for your good reference >>> Icoclone moving towards Ethereum Smart Contract