Smart contracts are programs that run alongside the blockchain when certain predetermined conditions are met. These conditions are in the form of “If/When…Then…” statements (If/when package is delivered by Andrew then Ryan pays Andrew 1 ETH).
Smart contracts can be programmed to do anything if it follows the proper “if/when…then…” statements. Within smart contracts you can have more than one stipulation to satisfy the contract. Once the conditions are met, the contract is executed immediately and automatically.
A guy named Nick Szabo, an American computer scientist invented the idea of smart contracts in 1998. He defined smart contracts as “computerized transaction protocols that execute terms of a contract”.
The first real world example of how this could work widespread is to say you are a farmer; you want crop insurance. You pay X amount of dollars a month into a smart contract which states “if the temperature in Edmonton (farm cornetites can be added) is above 200 degrees then contract pays Ryan X amount of dollars”. There is no need for an adjustor, this would just be paid for automatically and instantly if the conditions of the contract are met.
All real-world data is tracked between the blockchain and the entirety of the internet using an “oracle”, these oracles take commands to track things that are set out in a smart contact.
The big issue that I have seen so far is that to code such smart contacts you need experts to do it properly. This is to ensure you don’t lose your money. I’m sure with improvements to smart contract technology this will change to become more user friendly.