Thanks for starting a thread. I do see you have answered quite well, but I would like to add some points to it.
We all know what a contract is, when ever two or more parties agree to some terms before acting on something, they sign a contract in presence of a third party which reduces any counter party risk. And the trust is maintained among the group. But what if there's a contract which holds by itself and does not need a third party to place it to action. In current scenario, the answer is blockchain. As blockchain is a single source of truth and the data stored is near to immutable once written, unless a hard fork happens :D. So, why not deploy a algorithmic code in blockchain and let it work on its own.
Smart contract is a algorithmic piece of code which gets triggered on meeting certain conditions that may be external(feeds) or internal(via executing functions through transactions), which resides in the blockchain.
ā
Once deployed in the blockchain the contact can not be updated or deleted. It can only be replaced by a new one to which all the participating parties agree.
First introduced in Ethereum blockchain, which is capable of running a smart contract in it's Ethereum Virtual Machine.
Applications: