Smart Contracts are self executing code blocks deployed on the Ethereum blockchain. They contain data & code functions. Contracts make decisions, interact with other contracts, store data and transfer Ether (the unit of crypto-currency in the Ethereum blockchain) among users.As inputs occur, the contract responds by executing any type of obligations or conditions mandated by the logic of the contract.
For Instance:
A GPS coordinate indicating the arrival of a ship at the correct port could automatically trigger payment to the seller of goods carried by that ship. The input of the current price of a certain commodity could trigger the smart-contract to sell an option on that commodity. A buyer’s signature on an invoice can create a payment obligation that is automatically executed on the date specified if and when other conditions are met. A vending machine can pay the drone who restocks it upon completion of the restocking and based on the inventory it has been stocked with.