Smart contract is a distributed computer program residing on the blockchain that will execute itself when special conditions on the blockchain are met.
Smart contracts can be seen as a service-providing infrastructure, and every blockchain based application (distributed application - dApp) has a smart contract powering it in the background.
End users can use existing smart contracts; they do not need to deploy a new smart contract every time they need it (as opposed to the real world, where you would need to sign a new contract between two parties and could not use a public “template”).
Since smart contracts are deployed on the blockchain, they are by design unchangeable.
Let’s illustrate on an example:
Using a smart contract, a father could create a program that withdraws funds from his account and deposits them to his child’s account, if and when the child’s balance falls below a certain level. In theory smart contracts can be used to program all kinds of financial or business agreements, from auctions and escrows to the handling of tokenized digital assets