What is a smart contract?

A smart contract is a computer program or a transaction protocol that is intended to automatically execute, control or document events and actions according to

A smart contract is a computer program or a transaction protocol that is intended to automatically execute, control or document events and actions according to the terms of a contract or an agreement. Source

Video Explanations:

Kaspa Smart Contracts Explained: A Game Changer For Crypto!
What are Smart Contracts in Crypto? (4 Examples + Animated)