A smart contract is a set of rules that is on the part of a blockchain that will only allow the blockchain to continue when the smart contract is met. This is almost like an agreement between two parties on what is going to happen in order to make the payment. Parts of the contract can contain assets that the parties will then distribute among all parties of the agreement. Think of this smart contract as an agreement between two parties, when the agreement is met the goods will be exchanged.
Depending on the conditions that are met, these are not legal contracts, but if the right conditions are met, they can be viewed as a legal contract. With the improvement of technology, it is likely to see these fused with legal contracts more and more in the future. As the government finds more ways to track down these transactions, the opportunities for these contracts to become legal binding will be ever more present.