Smart contracts are deterministic and immutable computer programs stored on a blockchain that run when predetermined conditions are met.
In the 90s, cryptographer Nick Szabo coined the term and defined it as "a set of promises, specified in digital form, including protocols within which the parties perform on the other promises."