Smart contracts are simply put just digital contracts that remove the need for a third party participation. To picture how smart contracts can theoretically work, let’s say that you want to sell your house for which you already have a buyer. To do so you will hire a lawyer that will make sure that the transfer goes smoothly and that both involved parties get what they want. The lawyer will draw up a contract that you and the buyer sign which states that the buyer has to send the money to the escrow of the lawyer, this money will be then later on moved to the possession of the seller once he transfers the property. This process is, however, quite slow, expensive and not particularly safe (since there is an involvement of the lawyer).
With the use of smart contracts, there is no need for this middleman. We can create a program that will include conditions which have to be met before another action happens. E.g. The buyer’s money is not sent to the seller until the transfer of the property is successfully completed. A great advantage of smart contracts is that they are built within the blockchain which means that everything is distributed on a ledger and each contract is validated by everyone on the network. Once a smart contract is created it can never be changed, which means that no one can go behind your back and change the conditions on which all involved parties agreed.