The idea of smart contracts originated in the mid-90s when programmer and legal scholar Nick Szabo published a series of articles explaining their potential. Like a vending machine, smart contracts rely on machinery for enforcement. However, instead of using physical machinery, smart contracts are literally code that runs on a blockchain, a kind of open, distributed ledger that runs on the computers of thousands of users, and which has no central authority.
Source